Low-power depth sensing using dynamic illumination

ABSTRACT

In one embodiment, a system includes at least one projector configured to project a plurality of projected patterns onto a scene, the projected patterns including a first projected pattern that includes a plurality of first projected features, a camera configured to capture a plurality of images including a first detected pattern corresponding to a reflection of the first projected pattern, and one or more processors configured to: compute a depth map of the scene based on the first projected pattern, the first detected pattern, and relative positions of the camera and the at least one projector, project, using the projector, a second projected pattern comprising a plurality of second projected features onto a portion of the scene, where the second projected pattern is more sparse than the first projected pattern, and capture, using the camera, a second detected pattern corresponding to a reflection of the second projected pattern.

TECHNICAL FIELD

This disclosure generally relates to structured light, and in particularto systems and methods for determining depth using structured lightpatterns.

BACKGROUND

Augmented Reality (AR) systems may augment a real-world environment withsensory effects to provide an enhanced experience to users. AR systemsmay use devices such as cameras and head-mounted displays to integratevirtual objects with the real-world environment. Components of an ARsystem (e.g., a head-mounted display) may be connected and/or networkedwith a host computer system, a mobile device or computing system, or anyother hardware platform capable of providing AR content to one or moreusers.

One challenge in AR systems is accurately determining the positions ofphysical objects in the real-world environment so that virtual objectscan be displayed and tactile feedback can be provided to users based onthe locations of the physical and virtual objects. Depth sensing may beimplemented in AR systems to determine the positions of physical objectsand thereby provide a mapping of the real-world environment. Distancesfrom a sensor, such as a camera, to objects in a scene may be determinedusing structured light scanning, which involves projecting lightpatterns onto the scene. The sensor may be used to capture reflectionsof the patterns, and the distances to the objects may be determined byanalyzing the reflections. The reflections may be distorted by theshapes of the objects in the scene, and the distances to points on thesurfaces of the objects in the scene may be calculated based on thedistortions of the patterns detected by the sensor. The calculateddistances may be used to construct a depth map that may associate adistance with each pixel in an image of the scene to represent thethree-dimensional surfaces of objects in the scene. Depth maps may beused in AR applications and may be generated by devices having lightprojectors and cameras, such as mobile phones, AR glasses, AR headsets,and the like.

SUMMARY OF PARTICULAR EMBODIMENTS

Particular embodiments described herein relate to depth sensing usingstructured light. In various embodiments, a depth sensing system mayinclude one more projectors and a detector. The projectors emit maystructured light of known patterns into an environment and the detectormay detect reflections of the emitted light from objects in theenvironment. The reflections may be used to compute depth informationfor objects within the environment. For example, a depth map thatrepresents the three-dimensional features of objects in the environmentmay be generated by triangulating the emitted light and detectedreflected light.

In particular embodiments, a technique for saving power involvesprojecting a dense pattern to create a dense model of a scene, thensubsequently operating in a low-power scanning mode by projecting asparse pattern to sample portions of the scene for changes. If anychanges are detected, such as motion that intersects one or more linesof the sparse pattern, then the dense pattern may again be projected tocreate or update the dense model of the scene. Further, portions of thescene may be sampled for changes by projecting a sparse pattern, such asa line, onto the portions and using a camera to detect reflections ofthe sparse pattern that indicate movement. Periodically, e.g., everysecond, a single-frame burst of a dense pattern may be projected tocreate or update the dense model of a scene.

In particular embodiments, to reduce power consumption, a pattern ofpoints or lines projected in a frame at a particular time may be dividedinto two or more partial patterns, and the partial patterns may beprojected in consecutive time intervals. A camera may capture thepartial pattern at the time intervals in “partial” frames. Projecting apartial pattern in each frame in place of the entire pattern may reducepower consumption. For example, projecting half the lines of a patternin one frame and the other half in the next frame may reduce powerconsumption by 50%. The camera may receive the consecutive partialframes and combine them to re-construct the complete pattern.

Embodiments of the invention may include or be implemented inconjunction with an artificial reality system. Artificial reality is aform of reality that has been adjusted in some manner beforepresentation to a user, which may include, e.g., a virtual reality (VR),an augmented reality (AR), a mixed reality (MR), a hybrid reality, orsome combination and/or derivatives thereof. Artificial reality contentmay include completely generated content or generated content combinedwith captured content (e.g., real-world photographs). The artificialreality content may include video, audio, haptic feedback, or somecombination thereof, and any of which may be presented in a singlechannel or in multiple channels (such as stereo video that produces athree-dimensional effect to the viewer). Additionally, in someembodiments, artificial reality may be associated with applications,products, accessories, services, or some combination thereof, that are,e.g., used to create content in an artificial reality and/or used in(e.g., perform activities in) an artificial reality. The artificialreality system that provides the artificial reality content may beimplemented on various platforms, including a head-mounted display (HMD)connected to a host computer system, a standalone HMD, a mobile deviceor computing system, or any other hardware platform capable of providingartificial reality content to one or more viewers.

The embodiments disclosed herein are only examples, and the scope ofthis disclosure is not limited to them. Particular embodiments mayinclude all, some, or none of the components, elements, features,functions, operations, or steps of the embodiments disclosed above.Embodiments according to the invention are in particular disclosed inthe attached claims directed to a method, a storage medium, a system anda computer program product, wherein any feature mentioned in one claimcategory, e.g. method, can be claimed in another claim category, e.g.system, as well. The dependencies or references back in the attachedclaims are chosen for formal reasons only. However, any subject matterresulting from a deliberate reference back to any previous claims (inparticular multiple dependencies) can be claimed as well so that anycombination of claims and the features thereof are disclosed and can beclaimed regardless of the dependencies chosen in the attached claims.The subject-matter which can be claimed comprises not only thecombinations of features as set out in the attached claims but also anyother combination of features in the claims, wherein each featurementioned in the claims can be combined with any other feature orcombination of other features in the claims. Furthermore, any of theembodiments and features described or depicted herein can be claimed ina separate claim and/or in any combination with any embodiment orfeature described or depicted herein or with any of the features of theattached claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example network environment associated with acomputing system.

FIG. 2A illustrates an example of a triangulation computation.

FIG. 2B illustrates an example of a triangulation computation using twoprojectors.

FIG. 3 illustrates an example of a projector.

FIG. 4A illustrates an example detection event.

FIG. 4B illustrates an example detection event of a surface abnormality.

FIG. 5 illustrates an example head-mounted display.

FIG. 6 illustrates example grid light patterns having varying linepitch.

FIG. 7 illustrates example grid light patterns having varying lineintensities.

FIG. 8 illustrates example grid light patterns having varying linepatterns.

FIG. 9 illustrates movement of a grid light pattern and a correspondingepipolar line.

FIG. 10 illustrates an example method for determining depth using gridlight patterns.

FIG. 11 illustrates example temporal lighting patterns.

FIG. 12 illustrates an example method for determining depth usingtemporal patterns.

FIG. 13A illustrates example illumination patterns of an illuminator fordetermining depth from different distances.

FIG. 13B illustrates example Gaussian illumination patterns viewed fromdifferent distances.

FIG. 13C illustrates example projected patterns viewed from differentdistances.

FIGS. 13D and E illustrate example illumination patterns of atwo-dimensional illuminator for determining depth from differentdistances.

FIG. 14 illustrates an example method for activating or deactivating oneor more light emitters of an illuminator for determining depth fromdifferent distances.

FIG. 15 illustrates an example of reducing grid light pattern density toreduce power consumption.

FIG. 16 illustrates an example method for reducing grid light patterndensity.

FIG. 17 illustrates an example of partitioning a grid light pattern intoportions to reduce power consumption.

FIG. 18 illustrates an example method for partitioning a grid lightpattern into portions to be projected at different times.

FIG. 19 illustrates an example computer system.

DESCRIPTION OF EXAMPLE EMBODIMENTS

FIG. 1 illustrates an example network environment 100 associated with acomputing system 160. Network environment 100 includes a user 101, aclient system 130 (e.g., a head-mounted display), a computing system160, and a third-party system 170 connected to each other by a network110. Although FIG. 1 illustrates a particular arrangement of user 101,client system 130, computing system 160, third-party system 170, andnetwork 110, this disclosure contemplates any suitable arrangement ofuser 101, client system 130, computing system 160, third-party system170, and network 110. As an example and not by way of limitation, two ormore of client system 130, computing system 160, and third-party system170 may be connected to each other directly, bypassing network 110. Asanother example, two or more of client system 130, computing system 160,and third-party system 170 may be physically or logically co-locatedwith each other in whole or in part. Moreover, although FIG. 1illustrates a particular number of users 101, client systems 130,computing systems 160, third-party systems 170, and networks 110, thisdisclosure contemplates any suitable number of users 101, client systems130, computing systems 160, third-party systems 170, and networks 110.As an example and not by way of limitation, network environment 100 mayinclude multiple users 101, client system 130, computing systems 160,third-party systems 170, and networks 110.

In particular embodiments, user 101 may be an individual (e.g., a humanuser) that interacts or communicates with or over computing system 160.In particular embodiments, computing system 160 may generate, store,receive, and send data related to generating an artificial realityenvironment, including, for example, and without limitation, visualdata, audio data, tactile data, and so forth. Computing system 160 maybe accessed by the other components of network environment 100 eitherdirectly or via network 110. In particular embodiments, third-partysystem 170 may be structured-light projectors and/or detectors,wall-mounted speaker system, a mobile sensor system, a haptic actuator,and so forth. Third-party system 170 may be accessed by the othercomponents of network environment 100 either directly or via network110. In particular embodiments, one or more client systems 130, such asa head-mounted display, may access, send data to, and receive data fromcomputing system 160 and/or third-party system 170. Client system 130may access computing system 160 or third-party system 170 directly, vianetwork 110, or via a third-party system. As an example and not by wayof limitation, client system 130 may access third-party system 170 viacomputing system 160. Client system 130 may be any suitable computingdevice, such as, for example, a head-mounted display, augmented/virtualreality device, and so forth.

This disclosure contemplates any suitable network 110. As an example andnot by way of limitation, one or more portions of network 110 mayinclude an ad hoc network, an intranet, an extranet, a virtual privatenetwork (VPN), a local area network (LAN), a wireless LAN (WLAN), a widearea network (WAN), a wireless WAN (WWAN), a metropolitan area network(MAN), a portion of the Internet, a portion of the Public SwitchedTelephone Network (PSTN), a cellular telephone network, or a combinationof two or more of these. Network 110 may include one or more networks110.

Links 150 may connect client system 130, computing system 160, andthird-party system 170 to communication network 110 or to each other.This disclosure contemplates any suitable links 150. In particularembodiments, one or more links 150 include one or more wireline (such asfor example Digital Subscriber Line (DSL) or Data Over Cable ServiceInterface Specification (DOCSIS)), wireless (such as for example Wi-Fi,Bluetooth, or Worldwide Interoperability for Microwave Access (WiMAX)),or optical (such as for example Synchronous Optical Network (SONET) orSynchronous Digital Hierarchy (SDH)) links. In particular embodiments,one or more links 150 each include an ad hoc network, an intranet, anextranet, a VPN, a LAN, a WLAN, a WAN, a WWAN, a MAN, a portion of theInternet, a portion of the PSTN, a cellular technology-based network, asatellite communications technology-based network, another link 150, ora combination of two or more such links 150. Links 150 need notnecessarily be the same throughout network environment 100. One or morefirst links 150 may differ in one or more respects from one or moresecond links 150.

FIG. 2A illustrates an example of a triangulation computation. Forsimplicity, the figure shows the triangulation as a two-dimensionalsetup, but one of ordinary skill in the art would recognize that thesame concept can be applied in three dimensions. System environment 200includes a projector 210, which, for triangulation purposes, may berepresented by a projector location 215 (e.g., a point representation ofthe projector's lens). Conceptually, light emission 240 is projectedfrom the projector location 215 (shown as a single beam for simplicity,but the emission could be multiple beams or planes) and intersects anobject 260 at reflection point 230. The system environment 200, inparticular embodiments, further includes two detectors 220-1 and 220-2(collectively referred to as detectors 220) configured to havesubstantially overlapping fields of view. For purposes of thetriangulation computation, detectors 220-1 and 220-2 may be representedby detector location 250-1 and detector location 250-2, respectively(collectively referred to as detector locations 250). In particularembodiments, the detector locations 250 may be pin-hole lenses that areconceptually defined for the detectors 220.

Projector 210 may include any type of device that is capable of emittinglight. For example, projector 210 may include a laser emitter, such as avertical-cavity surface-emitting laser (VCSEL). Functionally, projector210 emits light emission 240 into system environment 200. Light emission240 may have various characteristics, such as a beam size, a beam shape,a beam intensity, a beam wavelength, and so forth. In particularembodiments, light emission 240 may be a coherent, collimated emissionof light (e.g., a laser). Light emission 240 may travel through systemenvironment 200 in the form of a line, a grid, a torus, and so forth. Inaddition, light emission 240 may include multiple instances of one ormore forms (e.g., two or more lines, two or more torus shapes, two ormore grids, etc.). In various embodiments, light emission 240 interactswith objects that lie in the path of light emission 240 (e.g., object260). The object could be, for example and not by way of limitation, awall, a chair, a human, an animal, a tree, a plant, a curved surface, amesh, and so forth. For example, object 260 may reflect and/or absorbsome or all of light emission 240. In particular, line c₁ may representa portion of light emission 240 reflected by object 260 that is incidenton detector 220-1. Similarly, line c₂ may represent a portion of lightemission 240 reflected by object 260 that is incident on detector 220-2.

Detector 220-1 and detector 220-2 may be any type of device that iscapable of detecting light. For example, either or both of detector220-1 and detector 220-2 may be an inside-outside light detector orcamera mounted on a mobile platform, an array sensor (e.g., a lineararray sensor, a planar array sensor, a circular array sensor, etc.), andso forth. In various embodiments, detector 220-1 and detector 220-2 maybe unfiltered. Accordingly, detector 220-1 and detector 220-2 mayexhibit a similar detection sensitivity to various wavelengths of light,without exhibit of preferential detection sensitivity to selectwavelength bands of light, such as the wavelength of the light emission240. Operationally, detector 220-1 detects light traveling into adetector aperture (not shown). In some embodiments, detector 220-1 anddetector 220-2 may each include one or more lenses that focus light. Forexample, and not by way of limitation, a lens may focus light travelingalong line c₁ to an image sensor of detector 220-1. In variousembodiments, detector 220-1 transmits the position of the detected lightto a client system 130 (e.g., a head-mounted display) for determiningthe position of objects in system environment 200.

In various embodiments, a processor in the head-mounted display executesan AR application (stored in any or all of the client system 130, thecomputing system 160, or the third-party system 170) to process datareceived from the detectors 220. For example, the AR application mayanalyze inputs received from the detector 220-1 to identify signalscorresponding to the reflection point 230 of the light emission 240. Forexample, the AR application could filter out signals corresponding tolight below a preset threshold intensity. Once the AR applicationidentifies a candidate detector signal that may correspond to thereflection point 230, the AR application may verify that it, in fact,corresponds to the reflection point 230 and calculate the depth of thereflection point 230 on the object 260 using triangulation techniques.

The geometric relationship between the projector 210, each of thedetectors 220, and the reflection point 230 on the object 260 may beused to form the basis for triangulation computation. The line a₁represents a known baseline distance between the projector location 215and the detector location 250-1 of detector 220-1. Similarly, line a₂represents a known baseline distance between the projector location 215and the detector location 250-2 of detector 220-2. Further, line brepresents the path of light emission 240 emitted from the projectorlocation 215. Light emission 240 may reflect off of an object 260 atreflection point 230. Line c₁ may represent the path of reflected lighttraveling towards detector location 250-1 from the reflection point 230,and line c₂ may represent the path of reflected light traveling towardsdetector location 250-2 from the reflection point 230.

Accordingly, a first triangle (herein referred to as “triangle 1”) maybe described by the line a₁, line c₁, and line b, forming angle α₁between line a₁ and line c₁, angle β₁ between line c₁ and line b, and anangle θ₁ between line b and line a₁. As described above, the length ofline a₁ is known since it may be pre-computed based on the fixeddetector location 250-1 and the fixed projector location 215. Inparticular embodiments, the angle θ₁ may also be known since thetrajectory of the light emission 240 relative to the fixed relativepositions between detector location 250-1 and projector location 215(represented by baseline a₁) is known. Although the angle θ₁ illustratedin FIG. 2A appears to be a right angle (i.e., a 90-degree angle), one ofordinary skill in the art would appreciate that θ₁ is not limited tosuch and could be any other angle. Lastly, the angle α₁ may be computedbased on the location of the reflection point 230 in the field of viewof detector 250-1. The point at which the reflection point 230 iscaptured by the sensor of detector 220-1 corresponds to a point in theimage plane defined by the field of view of detector 220-1.Conceptually, where that point appears in the image plane is where theline c₁ intersects the image plane. That point of intersection in theimage plane and the known center of the image plane, together with theknown relationships between the center of the image plane and thedetector location 250-1 (e.g., the distance between the center of theimage plane and the detector location 250-1 and the angle between theimage plane and the line connecting the detector location 250-1 and thecenter), may be used to compute the angle α₁ (e.g., via triangulation).Once angle α₁, side a₁, and angle θ₁ are ascertained, the rest of thedimensions of triangle 1 could be computed based on known geometricproperties of triangles. For example, the length of line b could becomputed to represent a first depth of reflection point 230 from theprojector location 215.

As previously described, one challenge with performing depthcomputations using emitted light is that the corresponding reflectedlight as captured by the detector needs to be accurately identified. Ifa point in the captured image is mistakenly identified as the reflectionof the emitted light, the triangulation computation would be erroneoussince various triangulation assumptions would not hold (e.g., if themistakenly-identified point in the image does not correspond to thereflection point 230, it cannot be used to represent the point ofintersection of line c₁ and the image plane and therefore thecomputation of the angle α₁ would be erroneous). One way to assist withthe detection of emitted light is to emit light in a particularwavelength (e.g., infrared) and use detectors with filters that aretailored for that wavelength. However, as previously described, doing somay not be practical in various applications. For example, if the depthsensing system is to be integrated with a head-mounted display withlimited resources (e.g., power, real estate, and weight), adding aspecialized filtered detector for detecting structured light may beinfeasible or undesirable, especially since the head-mounted display mayalready have unfiltered cameras that are used for object detection andother sensory purposes.

To assist with accurate identification of emitted light, particularembodiments verify a that a candidate reflection point is, in fact, areflection of the emitted light by performing a second depth computationfor that point using information captured by a second unfiltered camera.Referring again to FIG. 2A, a second triangle (herein referred to as“triangle 2”) may be described by the line a₂, line c₂, and line b,forming angle α₂ between line a₂ and line c₂, angle β₂ between line c₂and line b, and angle θ₂ between line b and line a₂. Similar to line a₁and angle θ₁, line a₂ and angle θ₂ may be known due to the knownrelative fixed positions of the projector location 215 and detectorlocation 250-2 and the trajectory of the emitted light 240. Thecomputation of angle α₂ may be similar to how α₁ is computed, describedin further detail above. In particular embodiments, a point in the imagecaptured by detector 220-2 may be identified as corresponding to thereflection point 230 captured in the image of detector 220-1. Inparticular embodiments, the correspondence between the points in the twocaptured images may be determined using any suitable stereocorrespondence or matching algorithms. Based on the location of such apoint in the image plane defined by the field of view of detector 220-2,along with the known center of that image plane and the knownrelationships between the center of the image plane and the detectorlocation 250-2 (e.g., the distance between the center of the image planeand the detector location 250-2 and the angle between the image planeand the line connecting the detector location 250-2 and the center), maybe used to compute the angle α₂ (e.g., via triangulation). Once angleα₂, side a₂, and angle θ₂ are ascertained, the rest of the dimensions oftriangle 2 could be computed based on known geometric properties oftriangles. For example, the length of line b could be computed torepresent a second depth of reflection point 230 from the projectorlocation. If the second depth of reflection point 230 computed usingdetector 220-2 differs (e.g., beyond a pre-determined threshold) fromthe first depth computed using detector 220-1, then the reflection point230 may be deemed to not correspond to the emitted light 240 andrejected.

FIG. 2B illustrates an example of a triangulation computation using twoprojectors 210-1 and 210-2. For simplicity, the figure shows thetriangulation as a two-dimensional setup, but one of ordinary skill inthe art would recognize that the same concept can be applied in threedimensions. System environment 201 includes two projectors 210-1 and210-2, which, for triangulation purposes, may be represented byprojector locations 215-1 and 215-2 (e.g., point representations of theprojector lenses). Conceptually, light emissions 240-1 and 240-2 areprojected from the respective projector locations 215-1 and 215-2 (shownas single beams for simplicity, but the emissions could be multiplebeams or planes) and intersect an object 260 at respective reflectionpoints 230-1 and 230-2. The system environment 201, in particularembodiments, further includes a detector 220 having a field of view. Forpurposes of the triangulation computation, the detector 220 may berepresented by a detector location 250. In particular embodiments, thedetector location 250 may be a pin-hole lens that is conceptuallydefined for the detector 220. Projectors 210-1 and 210-2 may be devicesthat are capable of emitting light, as described above with reference toFIG. 2A. Detector 220 may be any type of device that is capable ofdetecting light, as described above with reference to FIG. 2A.

The geometric relationship between the projectors 210, the detector 220,and the reflection points 230 on the object 260 may be used to form thebasis for triangulation computation. The line a₁ represents a knownbaseline distance between the projector location 215-1 and the detectorlocation 250. Similarly, line a₂ represents a known baseline distancebetween the projector location 215-2 and the detector location 250.Further, line b₁ represents the path of light emission 240-1 emittedfrom the projector location 215-1, and line b₂ represents the path oflight emission 240-2 emitted from the projector location 215-2. Lightemissions 240-1 and 240-2 may reflect off of an object 260 at reflectionpoints 230-1 and 230-2, respectively. Line c₃ may represent the path ofreflected light traveling towards detector location 250 from thereflection point 230-1, and line c₄ may represent the path of reflectedlight traveling towards detector location 250 from the reflection point230-2.

Accordingly, a first triangle (herein referred to as “triangle 1”) maybe described by the line a₁, line c₃, and line b₁, forming angle α₁between line a₁ and line c₃, angle β₁ between line c₁ and line b, and anangle θ₁ between line b and line a₁. As described above, the length ofline a₁ is known since it may be pre-computed based on the fixeddetector location 250 and the fixed projector location 215-1. Inparticular embodiments, the angle θ₁ may also be known since thetrajectory of the light emission 240-1 relative to the fixed relativepositions between detector location 250 and projector location 215-1(represented by baseline a₁) is known. Lastly, the angle α₁ may becomputed based on the location of the reflection point 230-1 in thefield of view of detector 250. The point at which the reflection point230-1 is captured by the sensor of detector 220 corresponds to a pointin the image plane defined by the field of view of detector 220.Conceptually, where that point appears in the image plane is where theline c₃ intersects the image plane. That point of intersection in theimage plane and the known center of the image plane, together with theknown relationships between the center of the image plane and thedetector location 250-1 (e.g., the distance between the center of theimage plane and the detector location 250-1 and the angle between theimage plane and the line connecting the detector location 250-1 and thecenter), may be used to compute the angle α₁ (e.g., via triangulation).Once angle α₁, side a₁, and angle θ₁ are ascertained, the rest of thedimensions of triangle 1 could be computed based on known geometricproperties of triangles. For example, the length of line b₁ could becomputed to represent a first depth of reflection point 230-1 from theprojector location 215-1.

FIG. 3 illustrates an example of a projector 210. System environment 300includes projector 210, a laser emission 340, optical element 350,emission pattern 360, and light projection 370 on object 330. Projector210 may include any type of device that is capable of emitting light.For example, projector 210 may include a laser emitter, such as avertical-cavity surface-emitting laser (VCSEL). Light emission 340 mayhave various characteristics, such as a beam size, a beam shape, a beamintensity, a beam wavelength, and so forth. In particular embodiments,light emission 340 may be a coherent, collimated emission of light(e.g., a laser). Light emission 340 may travel through systemenvironment 300 in the form of a line, a grid, a torus, and so forth. Inaddition, light emission 340 may include multiple instances of one ormore forms (e.g., two or more lines, two or more torus shapes, two ormore grids, etc.).

In various embodiments, the light emission 340 may pass through one ormore optical elements 350 to generated structured light used for depthsensing. The optical element 350 may include diffractive elements,refractive elements, and/or reflective elements. The optical element 350may collimate the light emission 340, may focus the light emission 340,may split the light emission 340 into multiple beams, may diffuse thelight emission preferentially along one or more axes to generate a lineand/or a grid pattern, may focus and/or diffuse the light emission 340.In particular, the optical element 350 may include a collimator forcollimating light, a beam splitter for splitting light emission 340 intotwo or more beams. In addition, the optical element 350 may include aline generator, such as a homogenizer with a non-periodic cross-sectionalong one axis, a diffractive optical element with grating angularseparation less than a spot angular width, a reflective or refractivesurface curved along one dimension, and so forth.

In some embodiments, the optical element 350 may modify the lightemission 340 to produce structured light with an emission pattern 360(e.g., one or more lines) that propagate through the environment 300. Invarious embodiments, the emission pattern 360 interacts with physicalobjects (e.g., 330) in its path. The object could be, for example andnot by way of limitation, a wall, a chair, a human, an animal, a tree, aplant, a curved surface, a mesh, and so forth. For example, object 330may reflect and/or absorb some or all of the light emission. When theemission pattern 360 encounters an object in the environment (e.g.,object 330), the line superimposes on the object 330, producing lightprojections 370. Light projections 370 may outline the contours ofobject 330, wrapping around curves, cusps, discontinuities, and soforth, thereby providing visual cues for textured or otherwise unevensurfaces and/or edges of object 330. Accordingly, the AR application mayidentify a distortion or discontinuity in the light projections 370, ascompared to the expected emission pattern 360, to determinecharacteristics of the object 330.

FIG. 4A illustrates an example detection event. System environment 400includes projector 210, light emission 340, optical element 350,emission pattern 360, object 330, reflected light 410, and image sensor430 (e.g., of detector 220-1 or detector 220-2, shown in FIG. 2A). Imagesensor 430 may include a grid of pixels (which may also be referred toas photosites), one of which is identified as pixel 420-1. Certainpixels may detect the reflected light 410. For ease of reference, suchpixels are referred herein as light-reflection pixels (e.g., one ofwhich is identified as light-reflection pixel 422-1).

In various embodiments, the emission pattern 360 forms a lightprojection on object 330, which can be detected by the image sensor 430.In particular, the object 330 reflects a portion of the light emissionpattern 360 towards the image sensor 430. In various embodiments, theobject 330 may include specular surfaces and/or diffuse surfaces.Specular surfaces may preferentially deflect light at a particular angle(e.g., at an angle to the object surface normal that mirrors theincident angle to the normal of the light pattern 360). Diffuse surfacesreflect light in multiple directions, without preferential reflection atcertain angles.

In various embodiments, the image sensor 430 may include an array oflight-sensitive pixels, also referred to as photosites, such as pixels420-1. When light from the environment 400 encounters a pixel, the pixelmay generate a signal. For example, a voltage drop across the pixel420-1 may increase or decrease proportionally to the intensity of lightreceived by the pixel 420-1. Similarly, when reflected light 410 fromthe object 330 encounters a pixel 422-1, the pixel may generate asignal. As shown in FIG. 4A, reflected light 410 is detected by pixels422-1. In some embodiments, the intensity of reflected light 410 mayexceed an average intensity of ambient light in system environment 400.Accordingly, the AR application may apply an intensity discriminator todisambiguate between reflected light 410 corresponding to the emissionpattern 360 and other light sources (referred herein as spurious lightor spurious signals). This process, for example, may help selectcandidate pixels that are more likely to correspond to reflected light410. In various embodiments, each candidate pixel may undergo theprocess described above with reference to FIG. 2A to verify that thepixel, in fact, corresponds to the reflected light 410 and its depth maybe computed based on triangulation. Accordingly, the AR application mayobtain a three-dimensional measurement of objects in system environment400. In addition, as the position of the light projection generated bylight pattern 360 moves along the surface of object 330 and/or movesaround system environment 400, the AR application may continuallygenerate depth and/or coordinate data from reflected light 410. The ARapplication may further compile the generated depth and/or coordinatedata to form a three-dimensional depth map of object 330 and/or systemenvironment 400. In further embodiments, the AR application may resolvethe detection coordinates corresponding to reflected light 410 tosub-pixel accuracy, thereby increasing the detection resolution.

FIG. 4B illustrates an example detection event of a surface abnormality.System environment 405 includes projector 210, light emission 340,optical element 350, emission pattern 360, object 330, reflected light410, and image sensor 430 (e.g., of detector 220-1 or detector 220-2,shown in FIG. 2A). Image sensor 430 may include a grid of pixels (whichmay also be referred to as photosites), one of which is identified aspixel 420-1.

In addition, system environment 405 includes object 490 that partiallyoccludes object 330 and introduces surface discontinuities between theedges of object 490 and the surface 330. Reflected light from object 490(herein referred to as reflected light 415) strikes certain pixels ofthe image sensor 430, such as pixel 424-1, at locations that differ fromthe position at which reflected light 410 from the object 330 strikesthe pixels (e.g., such as pixel 422-1), forming a discontinuous pattern.In various embodiments, the characteristics of the reflected light 415indicate surface properties of object 490. In particular, the ARapplication may utilize the location, orientation, number, intensity,and/or distribution of pixels (e.g., pixel 424-1) that receive reflectedlight 415 to determine the surface properties of object 490 and/or therelationship between object 490 and object 330. For example, as shown,there is a discontinuity between pixels associated with reflected light410 (e.g., pixel 422-1) and pixels associated with reflected light 415(e.g., pixel 424-1). The AR application may analyze some or all of thedisplacement, orientation, number, intensity, and/or distribution ofpixels associated with reflected light 410 relative to those of pixelsassociated with reflected light 415, in addition to the triangulationtechnique of FIG. 2A, to characterize and image object 330, object 490,and the surface discontinuity between objects 330 and object 490. Forexample, in some embodiments, pixels (e.g., 424-1) associated withreflected light 415 may be located below, above, to the left, to theright, rotate to the left, rotated to the right, etc. relative to pixels(e.g., 422-1) associated with reflected light 410. Additionally, oralternatively, the pixels associated with reflected light 410 may have adifferent intensity, a different spatial distribution, and/or adifferent number of pixels relative to the pixels associated withreflected light 415.

Furthermore, in some embodiments, projector 210 may emit multipleinstances of a light pattern 360 towards an object 330 and object 490(e.g., two or more lines of laser light) to improve the efficiency ofdepth mapping (e.g., the depth of multiple regions of the environmentmay be simultaneously determined). Accordingly, image sensor 430 mayreceive reflected light from each instance of light pattern 360 thatreflects off of objects in the environment 405. An application mayanalyze signals from the image sensor 430 to associate each signal witha particular instance of light pattern 360 emitted. The application maymatch or associate each light-reflection pixel (e.g., pixel 422-1 or424-1 shown in FIG. 4B) detected by a detector (e.g., detector 220-1and/or detector 220-2) with a particular instance of the emissionpattern 360 reflected off of object 330 and/or object 490. In certainembodiments, to facilitate the matching process, each instance of theemission pattern 360 may have a unique signature (e.g., each line mayhave a different intensity, wavelength, temporal or spatial encoding,etc.).

In other embodiments, the instances of the emission pattern 360 may haveidentical lighting characteristics (e.g., same intensity, color, pitch,etc.), except for their relative ordering. The ordering may be used inparticular embodiments to match each instance of emission pattern withdetected lighting patterns. For example, the emission pattern 360 mayinclude 5 lines that are vertically (and/or horizontally) spaced,oriented, and/or rotated from each other with a constant or variableseparation distance and/or rotational angle. An application may analyzethe detector signals generated by detector 220-1 and/or detector 220-2to identify and determine the relative ordering of reflected lightingpatterns. As an example, the projector may project 5 ordered lines thatare parallel to one another and spaced to cover an expected field ofview of the detectors. The reflected light from the 5 ordered lines,when detected by the detector, would maintain their relative ordering.In various embodiments, the reflected lighting patterns detected by thedetector may be logically grouped so that the reflected lightingpatterns belonging to the same group are deemed to correspond to thesame projected line. In various embodiments, segments or pixels ofreflected lighting patterns may be grouped based on their relativepositions or other characteristics (a spatial separation distance, aspatial separation direction, a spatial orientation, and so forth) toother segments or pixels of reflected lighting patterns. For example, ifa segment of reflected lighting pattern is closer to one group ofreflected lighting patterns than any other group, then it may beclassified as belonging to that group. By identifying groups ofreflected lighting patterns and their relative ordering, the groups ofreflected lighting patterns may be matched with respective projectedlines. For example, the top-most projected line may be associated withthe top-most group of detected lighting patterns, thesecond-from-the-top projected line may be associated with thesecond-from-the-top group of detected lighting patterns, and so forth.In various embodiments, a pixel belonging to a group may or may not, infact, correspond to the projected line associated with that group. Theembodiments described above with reference to FIG. 2A may be used toverify whether that pixel, in fact, corresponds to the projected line.If the pixel does correspond to the projected line, then an associateddepth value may be determined and used to generate a depth map;otherwise, it may be discarded and would not contribute to the depthmap.

FIG. 5 illustrates an example head-mounted display 510 that may be usedto implement the embodiments described herein. System environment 500includes head-mounted display 510, which includes detector 220-1,detector 220-2, projector 210, baseline a₁, and baseline a₂. In variousembodiments, baseline a₁ is a distance between projector 210 anddetector 220-1, and baseline a₂ is a distance between projector 210 anddetector 220-2. In addition, projector 210 includes emitters (e.g.,520-1), and voltage supplies (e.g., 530-1).

In various embodiments, detector 220-1 and detector 220-2 (hereinreferred to generally as detectors 220) may be front-facing unfilteredcameras disposed on the corners of head-mounted display 510. Thesedetectors 220 may function as inside-outside cameras for positiontracking. As shown, the detectors 220 may be positioned and orientatedon head-mounted display 510 to enable stereo imaging of systemenvironment 500. In particular, detector 220-1 may be located on a rightside of head-mounted display 510 (from the viewpoint of a user wearingthe display 510) and generate a right image of system environment 500.Further, detector 220-2 may be located on the left side of thehead-mounted display 510 and generate a left image of system environment500.

Accordingly, the detectors 220 may detect light reflected off of objectsin system environment 500. The AR application may analyze the detectordata generated by the detector 220-1 and detector 220-2 when determiningthe position of the head-mounted display 510 in system environment 500.In particular, because each of detector 220-1 and detector 220-2 areunfiltered, each detector exhibits similar detection sensitivities toeach wavelength of light. To isolate detector signals corresponding toreflected light emitted by projector 210, a computing system associatedwith the head-mounted display 510 may perform the embodiments describedherein (e.g., the triangulation and verification process described withreference to FIG. 2A).

Functionally, in some embodiments, each of detectors 220 may include aframe buffer. A frame buffer stores detection signals generated by adetector during an interval of time. A frame is a set of detectorsignals obtained during an interval of time. When the interval of timeis complete, the frame is stored in the frame buffer and incomingdetector signals are stored in a new frame until the next interval oftime elapses. The frequency with which new frames are generated may bedefined as a frame rate. In various embodiments, higher frame ratesenable higher resolution detection of temporal changes in systemenvironment 500, while concurrently producing a higher energy load. Onthe other hand, lower frame rates provide lower resolution detection oftemporal changes in system environment 500, but produce a lower energyload. In various embodiments, the AR application may configure eachdetector 220 to operate at the same frame rate or different frame rates.Additionally, or alternatively, the AR application may dynamicallyselect a frame rate at which each of detectors 220 operates. The ARapplication may further increase and/or decrease a frame rate based onone or more characteristics of system environment 500.

In some embodiment, the AR application may configure the detectors 220to operate at a low frame rate. For instance, the AR application mayconfigure the detectors 220 to operate between 10 and 50 frames persecond, such as e.g. 30 frames per second (fps). In such embodiments,the energy load may be low. For example, the energy load may be, forexample, between 10 and 50 milliwatts, such as 30 milliwatts.Accordingly, a smaller power supply may be sufficient to enable theoperation of the detectors 220. Additionally, or alternatively, theeffective lifespan of a power supply (e.g., on-board or external to thehead-mounted display 510) may be increased. Furthermore, the bill ofmaterials of each detector 220 may be inexpensive. For example, the billof materials may be between $2 and $10, such as e.g., $6.

In various embodiments, the projector 210 may include one or moreemitters 520 that emit light at one or more wavelengths. In someembodiments, each emitter or groups of emitters may be individuallyconnected to a power supply (e.g., a voltage supply). Additionally, oralternatively, one or more rows and/or one or more columns of emitters520 may be connected to a power supply. Accordingly, the AR applicationmay control the intensity of light emitted by one or more individualemitters, by one or more pairs of emitters, one or more rows ofemitters, by one or more columns of emitters, by one or more groups ofemitters, and so forth. In so doing, the AR application may increase ordecrease the intensity of light produced by the projector 210 andgenerate different emitted patterns. The AR application may furthercontrol the direction of a light emission produced by projector 210 byselectively turning on and/or off one or more emitters 520. For example,the AR application may turn on emitters 520 located on the leftward sideof projector 210 and turn off emitters 520 located on the rightward sideof projector 210 when directing a beam of light to the left. Similarly,the AR application may turn on and/or off emitters 520 to detect a beamof emitted light up, down to the right, to the left, and to angles ofinclination between the right, left, up, and down.

In further embodiments, the AR application may sequentially turn onand/or off emitters 520 in order to generate a light emission with aparticular form (e.g., a line, a grid, etc.). The light emissionproduces a light projection in a region of system environment 500. Byturning on and/or off emitters 520, the AR application may control theportion of the region of system environment 500 that interacts with thelight projection. In particular embodiments, the AR application mayconfigure the projector 210 to generate a light projection thatsequentially scans a selected region of system environment 500. The ARapplication may select the scanning frequency based on variousparameters such as a detector frame rate, a number of objects in theselected region, a distance to one or more objects in the selectedregion, a type of object, a surface feature of one or more objects, alight noise level of system environment 500, a type of light patternemitted by projector 210, and so forth.

In various embodiments, the AR application may turn on and/or offemitters 520 to increase and/or decrease the sparseness and/or densityof a projected light pattern. For example, if the AR applicationdetermines that an object being imaged is close to the head-mounteddisplay 510, then the AR application may reduce the intensity of lightemitted by each emitter 520 and/or turn off one or more emitters 520 toincrease the sparseness of a light pattern emitted by projector 210.Alternatively, if the AR application determines that an object isfarther away in system environment 510 and/or that system environment isa noisy environment, then the AR application may configure increase theintensity of light emitted by the emitters 520 (e.g., by increasing thevoltage supply to one or more of the emitters 520) and/or increase thedensity of the light pattern emitted by the projector 510 (e.g., byincreasing the number of emitters 520 that produce light).

The head-mounted display 510 may be worn by a user. As the user movesthrough system environment 500, the position of the head-mounted display510 may change.

Accordingly, as the position of the head-mounted display 510 movesthrough the system environment 500, the AR application may configure theprojector 210 to continuously, periodically, and/or sporadically emitlight into system environment 500. In addition, the AR application mayconfigure the detector 220-1 and the detector 220-2 to continuouslydetected ambient light in system environment 500. The AR application mayfurther continuously analyze data from the detector 220-1 and thedetector 220-2 to isolate detector signals corresponding to lightproduced by projector 210 that reflected off of objects in systemenvironment 500. The AR application may also compute depth and/orcoordinate information based on the isolated detector signals and addthe computed information to a system environment map.

In various embodiments, the projector 210 may be positioned at an angleto the orientation of the head-mounted device 510 (e.g., 45-degrees),such that as the user moves his or her head vertically or horizontally,the light pattern emitted by the detector sweeps the environment 500vertically and horizontally simultaneously. Accordingly, the ARapplication may obtain vertical and/or horizontal information about asurface based on either vertical or horizontal movement of the head ofthe user.

Furthermore, the AR application may dynamically adjust variouscharacteristics of the light pattern generated by projector 210 based onthe characteristics of system environment 500. For instance, if thehead-mounted display 510 is located at a position that is close to oneor more objects, the AR application may reduce the output intensity ofthe projector 210. However, if the head-mounted display 510 moves to aposition that is far away from objects in the system environment 500,the AR application may configure the projector 210 to increase an outputintensity. Furthermore, if the AR application may review the currentsystem environment map when determining how to modify the projector 210and the detectors 220. If the AR application determines that an area ofsystem environment 500 is well-mapped, then the AR application mayreduce the frame rate of the detectors 220. However, if the ARapplication determines that an unmapped object is present in systemenvironment 500 and/or that the position of a mapped object in systemenvironment 500 has changed, the AR application may increase the framerate of one or more of detectors 220-1 and detector 220-2.

In various embodiments, the AR application may dynamically adjust theemission intensity produced by projector 210 based on an amount of lightthat may be detected by an animate object (e.g., a human, an animal,etc.) located in system environment 500. In particular, the ARapplication may reduce an emission intensity and/or increase thesparseness of an emission pattern to keep a potential light detectionintensity below a threshold intensity level. For example, if the ARapplication implements a dense laser pattern, then the AR applicationmay reduce the output emission intensity to keep the potential lightdetection intensity below the threshold intensity level. Alternatively,in various embodiments, if the AR application implements a sparse lightpattern, then the AR application may implement a higher output intensityfor imaging object far away, as long as the potential light detectionintensity remains below the threshold intensity level. Although theabove description references, two detectors, this reference isnon-limiting as one detector and/or three or more detectors are withinthe scope of this disclosure.

In particular embodiments, a grid light pattern may be projected onto anobject, and reflections of the pattern may be captured using a camera.Distances to the object may be determined based on the capturedreflections of the pattern using triangulation techniques, in whichdetected points in the pattern are matched to corresponding projectedpoints in the pattern using characteristics of the pattern.

FIG. 6 illustrates example grid light patterns 604, 606 having varyingline pitch. A projected pattern 604 may be projected into a scene 600 byone or more projectors 210-1, 210-2, which may be mounted on a structureor device, such as a headset or head-mounted display. The projectors210-1, 210-2 may each be mounted at fixed baseline distances from thecamera. Projector 210-1 1 may project light in the form of projectedlines 620 a-624 a, and projector 210-2 may project light in the form ofprojected lines 610 a-616 a. Note that although a particular number ofprojected lines are shown in this example, each projector may projectany number of lines. The projected lines 610 a-616 a may intersect theprojected lines 620 a-624 a and may form a projected grid pattern 604.The projected lines 620 a-624 a are referred to herein as “horizontal”lines and the projected lines 610 a-616 a are referred to herein as“vertical” lines. The terms “horizontal” and “vertical” are used forexplanatory purposes and do not necessarily mean that the lines arehorizontal or vertical. At least a portion of the projected grid pattern604 may be incident on one or more objects 602, be reflected by theobjects 602, and form a reflected grid pattern 606 on the object 602.The reflected grid pattern 606 may be a distorted variation of theprojected grid pattern 604. The reflected grid pattern 606 may have ashape based on the shape of the projected grid pattern 604 and thedistances between the projector(s) and the points on the objects fromwhich the projected lines were reflected. For example, there may becurves or breaks in the reflected lines.

In particular embodiments, projected junctions 630 a-636 a may be formedat the intersections of the vertical projected lines 610 a-616 a and thehorizontal projected lines 620 a-624 a. The junctions 630 a-636 a, 640a, 650 a may be reflected by the objects 602 and be detected by thecamera 220 as respective detected junctions 630 b-638 b, 640 b, 650 b.Each point along a detected line 620 b may correspond to a point along acorresponding projected line 620 a, and each detected junction 630 bbetween detected intersecting lines may correspond to a projectedjunction 630 a between the projected lines that correspond to thedetected intersecting lines. Since a detected junction 630 b may be apoint on two different detected lines 610 b, 610 b, the correspondingpoint at the projected junction 630 a may be identified more reliablythan a point on a single line.

In particular embodiments, a camera 220 may capture one or more imagesof the reflected grid pattern 606. The camera 220 may detect a first setof detected lines 620 b-624 b, which may be reflections of the lines 620a-624 a, and a second set of detected lines 610 b-616 b, which may bereflections of the lines 610 a-616-a. The detected lines 610 b-616 b,620 b-624 b in the image captured by the camera may be represented aspixels in the captured images. Each pixel may correspond a point on thesurface of one of the objects 602.

As introduced above with reference to FIGS. 2A and 2B, a distance to apoint on an object may be determined using triangulation calculationsbased on identified light points on the surface of an object 602 thatform the detected patterns 610 b-616 b, 620 b-624 b, and known cameraand projector locations. The triangulation calculations may involveidentifying a correspondence between one or more features of theprojected grid pattern 604, such as a line 620 a or a junction 630 a,and one or more features of the reflected grid pattern 606, such as aline 620 b or a junction 630 b, and use the locations of the identifiedfeatures of the projected and reflected patterns to calculate a distanceto the object 602, or to points on the surface of the object 602. Theprojected lines 610 a-616 a, 620 a-624 a may be encoded withcharacteristics that may be used to identify particular projected linesfrom the corresponding detected lines 610 b-616 b, 620 b-624 b. Thecharacteristics may be, for example, line intensity, line pitch, linepattern, and so on.

One or more characteristics of the projected grid lines 620 a-624 a, 610a-616 a, such as the intensity of each line 620 a, and/or the pitch(spacing) between each pair of adjacent projected lines 620 a, 622 a,may be unique (at least within a particular projected grid pattern 604),so that each projected line may be associated with unique values ofthese characteristics. These characteristics may be reflected by theobject 602 and detected as detected characteristics. The detectedcharacteristics may be identified in the detected lines 620 b-624 b, 610b-616 b using the camera 220. The detected characteristics may be usedto identify the projected line 620 a that corresponds to a particulardetected line 620 b by finding a projected line 620 a having a projectedcharacteristic that matches the detected characteristic of the detectedline 620 b.

In particular embodiments, as described above, each projected line'scharacteristic(s), e.g., intensity, may be different from that of otherprojected lines in the projected grid pattern 604, or at least from thatof other adjacent or nearby lines. The correspondence between theprojected lines and the detected lines may be determined by matchingparticular projected lines to particular detected lines based on theirassociated characteristics. For example, the projected grid pattern 604has a line pitch characteristic that varies, as can be seen in theincreasing distances between lines toward the bottom right of theprojected grid pattern 604. That is, distances between pairs of adjacentlines may be different for different pairs of adjacent projected lines.As an example, the distance between projected lines 612 a and 614 a,which may be referred to as d1, is different from the distance betweenprojected lines 614 a and 616 a, which may be referred to as d2. Thesetwo distances may be used to identify the detected line 622 b thatcorresponds to the projected line 622 a. For example, a ratio of d1 tod2 may be calculated as d1/d2 and compared to ratios of distancesbetween lines in the detected grid pattern 606, such as a ratio of d3 tod4, where d3 is the distance between detected lines 612 b and 614 b, andd4 is the distance between detected lines 614 b and 616 b. If thespacing of the projected lines 620 a-624 a is configured so that theratio d1/d2 is unique in the projected grid pattern 604 when compared toratios calculated for other adjacent pairs of lines in the grid pattern604, then a corresponding detected line 622 b may be identified bycomputing the corresponding ratios in the detected grid pattern 606 andfinding a detected ratio d3/d4 that matches (e.g., is equal to or withina threshold tolerance of) the ratio d1/d2. The ratio d3/d4 may be aratio of the distances between the detected lines 612 b and 614 b (d3)and 614 b and 616 b (d4).

In particular embodiments, each projected line 610 a may be continuous.Each projected line 610 a may have endpoints, in which case the line maybe continuous between its endpoints. Since the projected patterns 604are continuous (at least to their outer boundaries, for patterns thatare of a particular size), an abrupt change in depth in the real-worldenvironment may create a discontinuity in the detected grid pattern 606.Changes in depth in the real-world environment may be detected byidentifying discontinuities in the reflected pattern. Changes incharacteristics along the reflected lines may also indicate thatjunctions are disconnected. When a projected line 610 a crosses an edgeof an object 602, the corresponding detected line 610 b may have adiscontinuity that corresponds to a location of the edge of the object602. This discontinuity may be used to detect object boundaries. Forexample, the top left of the object 602 has a diagonal boundary thatcrosses the detected pattern 606. The topmost and leftmost lines of theprojected pattern 604 are truncated in the detected pattern 606, and thejunction between the leftmost and topmost lines at the top left cornerof the projected pattern 604 does not have a corresponding detectedjunction in the detected pattern 606. The absence of this junction fromthe detected pattern 606 and the presence of nearby junctions in thedetected pattern 606, such as the junction between detected lines 620 band the leftmost line of the detected pattern 606, indicates that thereis an edge of the object 602 near the latter junction.

In particular embodiments, a junction 630 may be used to uniquelyidentify a given pair of intersecting lines 610, 620. A correspondencebetween a detected junction 630 b and a projected junction 630 a may bedetermined based on characteristics of the junction, such as therelative intensities of the lines 610, 620 that intersect at thejunction 630 and the relative spacing, horizontally and vertically,between the lines 610, 620 that intersect at the junction and otherlines, e.g., lines 612, 622. The characteristics may be determined for aprojected junction 630 a using lines 610 a, 620 a and, optionally, otherlines, e.g., lines 612 a, 622 a. The projected characteristicsdetermined for the projected junction 630 a may be compared to orcorrelated with detected characteristics of a detected junction 630 busing detected lines 610 b, 620 b and, optionally, other lines, e.g.,detected lines 612 b, 622 b.

In particular embodiments, the detected characteristics of detectedlines, such as the detected intensity or the distance between detectedlines, are not necessarily the same as the corresponding projectedcharacteristics, but may be sufficiently similar so that a correspondingprojected line or junction may be determined by comparing multipleprojected and detected characteristics or using tolerances so thatcharacteristics that are not equal but are within a predeterminedtolerance of each other, e.g., 1%, 3%, 5%, or other suitable tolerance,are determined to be equal. For example, if the intensity of eachprojected line differs by 10% from the adjacent projected lines, thenthe reflected line that corresponds to (e.g., matches) a particularprojected line having an intensity value of 20 may be identified bysearching the reflected lines for a line having an intensity of 20 plusor minus a tolerance, such as 5%.

In particular embodiments, the line structures of the projected anddetected patterns may be used to identify lines that have a non-matchingcharacteristic but are between pairs of other lines for whichcharacteristics do match. For example if 10 horizontal lines areprojected in a grid, with the first line having an intensity of 1, thesecond 10, and so on, up to the tenth line having an intensity of 100,then the projected line that corresponds to a particular detected linehaving a detected intensity value of 23 may be identified by searchingthe projected lines for a projected line having an adjacent projectedline on one side less than 23 and an adjacent projected line on theother side greater than 23.

In particular embodiments, there may be ambiguity in the determinationof which projected junction 630 a corresponds to a particular detectedjunction 630 b. For example, the reflected intensities of two adjacentlines may be difficult to distinguish in certain situations. Ambiguityat a particular junction may also be resolved or reduced usingdeterminations made for surrounding junctions. The detected attributes(e.g., intensity, pitch, etc.) or determined location of a detectedjunction may be propagated to neighboring junctions. The detectedattributes or determined location of each junction may have associatedconfidence values, and the confidence values may be propagated toneighbor junctions along with the detected attributes or determinedlocations.

In particular embodiments, the depth of an object 602 in an image may bedetermined by identifying a detected junction 630 b at which detectedvertical and horizontal lines 610 b and 620 b intersect on the object602 in the image. The lighting characteristics of the detected junction630 b may then be used to identify the corresponding projected junction630 a, which may be used to triangulate the depth (e.g., distance to)the point on the object 602 that corresponds to the detected junction630 b. The lighting characteristics may be understood as informationencoded in the projected junction, and may include the intensities ofthe detected lines that intersect at the junction 630 b and theircorresponding intensities, the distances to neighboring lines, andtemporally-encoded information, which is described with reference toFIG. 11. The lighting characteristics may be propagated to otherjunctions according to the lines between junctions. The propagation maybe performed in steps, e.g., by propagating the lighting characteristicsthat have been determined or received (from another junction) at ajunction to each adjacent junction (e.g., first-degree neighbor) at asuitable time, e.g., after each frame, or after each N frames. In thisway, information may propagate between junctions in a localized manner.The propagation of information across the graph of junctions mayconverge quickly. Reliability information (e.g., confidence values)about the determinations may also be propagated. Reliability thresholdsmay be used to decide whether to propagate information to otherjunctions. The reliability information may be used to form a weightedgraph, for example, in which the nodes correspond to junctions and theedges correspond to lines between junctions The depth of a detectedjunction 630 b may be computed using triangulation based on theinformation available at the junction 630 b, which may includeinformation propagated from other junctions, such as attributes andlocations or depths of nearby junctions.

FIG. 7 illustrates example grid light patterns 704, 706 having varyingline intensities. As can be seen in FIG. 7, the intensity of each linein the projected pattern 704 may be greater than the intensity of theline above it (for horizontal lines) or to the left of it (for verticallines). As an example, if each of the projected lines 710, 720 has aunique intensity, then when a detected junction 730 b is detected by thecamera 220, the intensities of the intersecting detected lines 710 b,720 b that form the junction 730 b may be detected by the camera andused to identify the specific projected junction 730 a that correspondsto the detected junction 730 b by identifying intersecting projectedlines that have corresponding intensities. For example, if the projectedline 710 a has an intensity of 20 and the projected line 720 a has anintensity of 30, then a detected line 710 b having an intensity of 20may correspond to the projected line 710 a and a detected line 720 bhaving an intensity of 30 may correspond to the projected line 710 b. Asanother example, the intensity may vary in other ways, e.g., theintensity of each line may be less than the intensity of the line aboveit (for horizontal lines) and less than the intensity of the line to theleft of it (for vertical lines). The intensity of a projected lines mayincrease across the projected grid pattern 704, so the intensity of aprojected line 712 a may be set based on a value determined bymultiplying the intensity of another line 710 a by factor such as, e.g.,1.25, 1.5, 2.0, 0.5, or the like. As another example, the intensity of aprojected line 712 a may be set based on a counter value that isincremented for each projected line, or based on another value that isunique for each projected line 710, 720 in the projected grid 704, suchas a randomly-selected value that is unique in the projected grid 704.

FIG. 8 illustrates example grid light patterns 804, 806 having varyingline patterns. As can be seen in FIG. 8, each projected line 810 a, 812a, 814 a may have a different line pattern. Each the line patterns maybe, e.g., dots arranged to form a line of dots (e.g., small circles), adashed line, or other shapes arranged in a line. The line pattern may beuniform, e.g., having a constant distance between shapes, and the shapesmay be of the same size. Alternatively, the distance between shapes orthe size of the shapes may vary. As an example, the distance betweenshapes of each projected line 810 a may be greater than the distancebetween shapes of an adjacent projected line 810 b, or the size ofshapes in each line may be greater than the size of shapes in anadjacent line.

As an example, if each of the projected lines 810 a, 820 a has a uniqueline pattern (e.g., size and/or shape of elements such as dashes ordots), then when a detected junction 830 b is detected by the camera220, the patterns of the intersecting detected lines 810 b, 820 b thatform the junction 830 b may be detected by the camera 220 and used toidentify the specific projected junction 830 a that corresponds to thedetected junction 830 b by identifying intersecting projected lines thathave corresponding patterns. For example, if the projected line 810 ahas a dashed line pattern with the length of each dash being twice thelength of the space between each pair of dashes, then a detected line810 b having the same dashed line pattern corresponds to the projectedline 810 a.

FIG. 9 illustrates movement of a grid light pattern and a correspondingepipolar line. In particular embodiments, at a particular junctionpoint, the horizontal and vertical lines agree on a depth. When there isa movement in depth, e.g., as a result of movement of the device (whichmay be detected by, for example, a change in GPS coordinates) ormovement of an object in the scene (which may be detected by, forexample, a change in the image captured by the camera), the point ofintersection of the reflected lines may move. A line between an initialpoint at which the lines intersected prior to the movement and asubsequent point at which they intersect after the movement is referredto herein as an epipolar line 906. The epipolar 906 may correspond to apath, and the two junctions may only be located on that path. If thereare N lines in one direction and M in the perpendicular direction, thenthere are N×M junctions that have certain paths they can move through.These paths should have as little in common with one another aspossible. Then if a point is located on a particular path, thecorresponding two junctions may be determined.

In particular embodiments, given the baseline distances (e.g., thedistance between the first and second projectors), the junction may beone of a relatively small number of possible choices, because only arelatively small number of horizontal and vertical line pairs mayintersect at that point. To resolve which lines correspond to thejunction, there is no need to check all junctions in the grid (a grid ofM horizontal lines by N vertical lines may include M×N junctions). Onlythe subset of junctions that could potentially correspond to thedetected point in the image need be searched. The subset may includejunctions on or near an epipolar line that intersects the initiallocation of the junction. For example, if there are 5vertical/horizontal line pairs that may hit the point, then only thosepairs need be searched to identify the pair that corresponds to thepoint. Further, the line for a vertical projector and camera pair mayonly move by or up to a certain distance based on a depth change.Similarly, the line for the horizontal projector and camera pair mayonly move by or up to a certain distance based on the same depth change.The combination of the two, e.g., the intersection of the lines, maymove in a constrained way, which corresponds to an epipolar. Thecalibration (horizontal and vertical baselines) may produce two epipolarconstraints, which may determine a line through which the junction maymove, e.g., the epipolar. This constraint may narrow down the set ofpossible projected junctions that correspond to a reflected junction.The intensity and pitch coding described above may also be used tonarrow down the possible projected junctions that correspond to thereflected junction if there is ambiguity in identifying the projectedjunction. The encoding and epipolar constraints may be combined tonarrow the possibilities to a single projected vertical-horizontal linepair (e.g., junction) to which a reflected vertical-horizontal line pairmay correspond.

As an example, when a movement of the device or of an object in thescene captured by the camera is detected, a reflected junction that wasdetected at an initial point (prior to the movement) may be detected ata subsequent point (e.g., pixel) in an image (subsequent to themovement). To determine whether the reflected junction detected at thesubsequent point corresponds to the junction that was detected at theinitial point (e.g., is the same reflected junction that was detected atthe initial point, and therefore corresponds to the same projectedjunction as the junction detected at the initial point), the location ofthe subsequent point may be compared to an epipolar line that intersectsthe initial point. If the subsequent point is on (or sufficiently near)the epipolar line, then the reflected junction detected at thesubsequent point may correspond to the same reflected junction that wasdetected at the initial point, and therefore to the same projectedjunction as the reflected junction that was detected at the initialpoint.

Referring to FIG. 9, a projected grid light pattern 904 a including ajunction 942 a is projected onto an object 902. The grid light pattern904 includes horizontal lines projected by a first projector. Thehorizontal grid lines of the pattern 904 a are projected by a firstprojected and the vertical grid lines are projected by a secondprojector. A reflection of the projected pattern 904 a may be detectedby a camera and used to generate a detected pattern 904 b having adetected junction location 942 b that corresponds to the projectedjunction 942 a. Subsequently, motion occurs in which the object 902moves to the right and upward relative to the camera, so the junctionlocation moves to a second detected junction location 942 c. The motionof the junction from location 942 b to location 942 c may be along anepipolar line 906. Further, as the depth to an object changes, thedetected lines from the projector that projects horizontal lines maymove up or down in the image, and the detected lines from the projectorthat projects vertical lines may move left or right in the image.

FIG. 10 illustrates an example method 1000 for determining depth usinggrid light patterns. The method may begin at step 1010, where the methodmay project, using a first projector, a first projected pattern havingone or more first projected lighting characteristics. At step 1020, themethod 1000 may project, using a second projector, a second projectedpattern having one or more second projected lighting characteristics,wherein the first projected pattern intersects the second projectedpattern. At step 1030, the method 1000 may capture, using a camera, animage including first and second detected patterns corresponding toreflections of the first and second projected patterns, respectively,wherein the camera is located at a first baseline distance from thefirst projector and at a second baseline distance from the secondprojector.

At step 1040, the method 1000 may identify a detected point in the imagethat corresponds to a projected point in at least one of the first andsecond projected patterns by comparing detected lighting characteristicsof the first and second detected patterns with the first and secondprojected lighting characteristics. At step 1050, the method 1000 maycompute a depth associated with the detected point based on theprojected point, the detected point, and a relative position between thecamera and at least one of the first and second projectors.

In particular embodiments, the first projected pattern may include aplurality of first projected lines, and the second projected pattern mayinclude a plurality of second projected lines. The detected lightingcharacteristics may include a plurality of first reflected lines and aplurality of second reflected lines that intersect the first reflectedlines, and the first and second reflected lines may be based onreflections of the first and second projected lines from a surface of anobject. A detected point on the image that corresponds to a projectedpoint in one or more of the first and second projected patterns may beidentified by identifying a reflected junction at which one of the firstreflected lines intersects one of the second reflected lines.

In particular embodiments, the reflected junction may be associated withone or more reflected junction characteristics. The projected junctionmay correspond to the reflected junction, such that the projectedjunction is at an intersection of one of the first projected lines andone of the second projected lines, wherein the projected junction isassociated with one or more projected junction characteristicsdetermined based on (1) the one or more first projected lightingcharacteristics associated with the first projected pattern and (2) theone or more second projected lighting characteristics associated withthe second projected pattern, and wherein one or more of the projectedjunction characteristics match one or more of the reflected junctioncharacteristics. The depth for the detected point may be determinedbased on a depth associated with the reflected junction, which may bedetermined based on the camera, at least one of the projectors, thereflected junction, and the projected junction that corresponds to thereflected junction.

Particular embodiments may repeat one or more steps of the method ofFIG. 10, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 10 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 10 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates an example method fordetermining depth using grid light patterns including the particularsteps of the method of FIG. 10, this disclosure contemplates anysuitable method for determining depth using grid light patternsincluding any suitable steps, which may include all, some, or none ofthe steps of the method of FIG. 10, where appropriate. Furthermore,although this disclosure describes and illustrates particularcomponents, devices, or systems carrying out particular steps of themethod of FIG. 10, this disclosure contemplates any suitable combinationof any suitable components, devices, or systems carrying out anysuitable steps of the method of FIG. 10.

In particular embodiments, depth sensing may be performed by projectinga pattern, such as a line, and varying a projected lightingcharacteristic of the pattern, such as lighting intensity, over a timeperiod according to a temporal lighting-characteristic pattern, whichmay be associated with the projected pattern. The temporallighting-characteristic pattern may be a pattern of lightingintensities, for example. A camera may capture the projected pattern,e.g., the line, in a plurality of images over the time period to form adetected pattern, and determine a detected temporal lightingcharacteristic pattern, e.g., a pattern of lighting intensities, such as3, 5, 7, and 9, based on the detected pattern. The depth sensing systemmay identify the particular projected pattern that corresponds to agiven detected pattern by comparing the detected temporal lightingcharacteristic pattern to the projected temporal lighting characteristicpatterns that were used for projected patterns. The projected patternthat has the same temporal lighting characteristic pattern, e.g., 3, 5,7, and 9, may be the particular projected pattern that corresponds tothe given detected pattern.

FIG. 11 illustrates example temporal lighting patterns 1102-1130. Alighting pattern for which one or more characteristics vary over time,e.g., according to a temporal lighting characteristic pattern, may beprojected using a suitable type of projector. The projected lightingcharacteristic pattern may be projected as lighting characteristics ofone or more shapes. The lighting characteristics may be, e.g.,intensities of shapes, geometric characteristics of shapes, such asdistances between lines, or other suitable characteristics of one ormore projected shapes. The shapes may be, e.g., grid of lines, and theshapes may have the lighting characteristics specified by the pattern.One or more shapes may be projected at different times using differentlighting characteristics. A camera may capture reflected light beams ina sequence of images and identify a detected pattern of temporallighting characteristics based on the images. The characteristics ofpreviously-projected shape patterns of projected lightingcharacteristics may be compared to the characteristics of detectedpatterns in a sequence of captured images to find the image pixels thatcorrespond to the projected beams, and the correspondence may be used todetermine the depth of each pixel by triangulation based on thelocations of the corresponding image pixels. Distances to the object maybe determined based on the reflections detected by the camera usingtriangulation techniques in which the correspondence between lines orother patterns detected by the camera and projected lines may beidentified by matching the pattern of temporal lighting characteristicsof the beams received over time to the known patterns of temporallighting characteristics of the projected beams to identify theprojected beam that corresponds to the detected lines or other patterns.

In particular embodiments, the temporal lighting characteristics may belight intensity values. The intensities used by the projector may bedetermined using a temporal lighting characteristic pattern, which maybe sequence of values such as an example sequence 1102. The examplesequence 1102 has the values 3, 5, 7, 9. Each value in the sequence maybe projected for a duration of time, e.g., 5 milliseconds, 100milliseconds, or other appropriate duration. Time values are associatedwith the sequence 1102 in FIG. 11 to illustrate that each number in thesequence may be used as the intensity of a projected line at a differenttime. Thus, for example, a line or other shape may be projected havingan intensity of 3 for a duration of T milliseconds, after which theintensity may be changed to 5 for another T milliseconds, then to 3 foranother T milliseconds, and to 9 for another T milliseconds. The patternmay then repeat. The duration of time for which each intensity isprojected may correspond to the rate at which frames are captured, inwhich case the intensity of each line may vary through the course of asequence of frames. The time to project the pattern may be referred toas a time period of the pattern. In this example, the time period of thepattern 1102 is 4T milliseconds. A frame may be captured every Tmilliseconds so that each intensity is captured in a separate frame. Thepattern may then be determined based on the captured frames. Forexample, a detected pattern having an associated intensity may bedetermined based on the intensity of a detected line or other feature ineach frame. The detected temporal pattern in this example is 3, 5, 7, 9.The detected temporal pattern may then be used to identify eachprojected line. In this example, the detected pattern 3, 5, 7, 9 may becompared to the previously-projected pattern 3, 5, 7, 9, and the lineprojected when the pattern 3, 5, 7, 9 was projected may be the projectedline that corresponds to the detected line. Different sequences may beused for different projected lines. The sequence may be a uniquesequence relative to other sequences projected by the depth sensingsystem over a period of time, e.g., during a particular hour or day.Since the sequence is different from other sequences that may bedetected during the period of time, the projected shape pattern 604 thancorresponds to the sequence may be identified by finding a projectedpattern having the same sequence as the detected pattern 606. Aftercapturing a number of frames that correspond s to the sequence length,the projected line that corresponds to a particular detected line may beidentified by comparing the detected sequence to projected sequence.

Since the intensity values determined from camera frames may beimprecise, the intensities of a number of consecutive lines may bematched to a subsequence of the sequence of known projected intensitiesthat were encoded by the projector. This number of consecutive lines tobe matched may be increased to increase confidence that thecorrespondence has been identified correctly. That is, the intensityvalue of each projected beam may correspond to a number in apredetermined sequence in which subsequences of a particular length N(e.g., 3 consecutive numbers) are unique. For N consecutively-detectedlines, the corresponding projected lines may be identified by finding asubsequence of the same N consecutive numbers in the predeterminedsequence.

FIG. 11 illustrates three different projected patterns that encode thetemporal lighting characteristic pattern 3, 5, 7, 9. Four lines11104-1110 of different intensities encode the pattern 3, 5, 7, 9 in theline intensities. The line 1104 has an intensity of 3, and is projectedstarting at a time T1 for a duration of time. The line 1106 has anintensity of 5 and is projected starting at a time T2 for the durationof time. The line 1108 has an intensity of 7 and is projected at a timeT3 for the duration of time. The line 1110 has an intensity of 9 and isprojected at a time T4 for the duration of time.

As another example, four lines 1114-1120 of different widths encode thepattern 3, 5, 7, 9 in the line widths. The line 1114 has a width of 3(e.g., 3 pixels), the line 1116 has a width of 5, the line 1118 has awidth of 7, and the line 1120 has a width of 9. Each line width may beprojected for a duration of time. Each line may be projected for thesame duration of time. Alternatively, the lines 1114-1120 may beprojected for different time durations, and the detection of transitionsbetween different characteristics in a pattern may be done based onchanges in the temporal lighting characteristics. For example, when anintensity of a projected pattern changes, the camera may advance to thenext frame.

An example projected pattern 1124-1130 includes parallel lines ofdifferent densities based on the sequence 1102. A first projectedpattern 1124 has 3 lines, a second projected pattern 1126 has 5 lines, athird projected pattern 1128 has 7 lines, and a fourth projected pattern1130 has 9 lines. The first pattern 1124 may be projected for a durationof time, followed by the second pattern 1126 for the duration of time,the third pattern 1128 for the duration of time, and the fourth pattern1130 for the duration of time. The total time period is 4T if eachduration of time is of length T time units. Each of the projectedpatterns 1124-1130 may be captured by a camera, and the numeric valueencoded in each projected pattern may be extracted to generate thedetected pattern of temporal lighting characteristic values. The depthsensing system may count the number of non-intersecting lines in eachprojected pattern 1124-1130, and may thus determine the number 3 fromthe first pattern 1124, 5 from the second pattern 1126, 7 from the thirdpattern 1128, and 9 from the fourth pattern 1130.

An example repeating detected temporal lighting characteristic pattern1130 includes the number 0 at time 1, followed by the three successiveoccurrences of the pattern 3579, and the number 1 at time 14. The firstoccurrence is at time 2-5, the second at time 6-9, and the third attimed 10-13. The projected lighting characteristic pattern may berepeated in this way so that it may be detected at a wider range oftimes. The pattern may be repeated continuously until a differentpattern is selected. The depth sensing system may identify the patternas a repeating sequence 3, 5, 7, 9 based on the pattern 1130.

In particular embodiments, a projector may be mounted on a structure ordevice, such as a headset, at fixed distances from the camera. Toproject light of different intensities, the projector may use lines ofemitters, and there may be a different number of emitters on each line,so that each line projects a different intensity. Alternatively,addressable illuminators may be used, in which different currents can beapplied to the emitters to generate different intensities.

Temporal intensity encoding may be combined with other encodingtechniques, such as using different intensities for differentsimultaneously-projected lines (projected to different locations), orvarying the distance between projected lines. These encodings may beused to resolve ambiguity about where a particular point detected in acamera image is in the pattern and thereby determine the depth of thatpoint using triangulations.

In particular embodiments, a projector may project a pattern, referredto herein as a projected pattern, which may include one or more shapes,such as lines or other shapes. Each projected pattern may be associatedwith a projected temporal lighting characteristic pattern that mayspecify how a lighting characteristic of the projected pattern changesover time. As an example, two different projected patterns, Pat1 andPat2, may be projected. Pat1 may be a line, and may have an associatedtemporal lighting characteristic pattern 1, 3, 5, 7. Pat2 may be a dot(e.g., a point of light) and may have an associated temporal lightingcharacteristic pattern 2, 4, 6.

A camera may capture images that contain the projected patterns. Forexample, a camera may capture an image of both the line of Pat1 and thedot of Pat2. The camera may capture images at a particular frame rate,e.g., 30 frames per second or other suitable rate. The projector mayproject pattern values at the same rate. Thus, the projector may projectthe line having an intensity of 1 and the dot having an intensity of 2at time T1 for a duration of time that corresponds to 30 frames persecond. The camera may capture the image containing the line havingintensity 1 and the circle having intensity 2, followed by another framecontaining the line having intensity 3 and the dot having intensity 4.The depth sensing system may attempt to match these two sequences topreviously projected sequences. The previously projected sequences are1, 3, 5, 7 and 2, 4, 6, so which neither of the detected sequences 1, 3and 2, 4 match. The projector may continue by projecting the line withan intensity of 5 and the dot with an intensity of 6. The depth sensingsystem may compare the detected sequences to previously-projectedsequences, and may find a match of for the pattern 2, 4, 6, which wasused to project the dot. The sequence 2, 4, 5 is associated with aprojected dot pattern, so the projected dot pattern is identified as theprojected pattern that corresponds to the detected dot pattern.

When a depth is determined, a confidence level may be associated witheach pattern. If the confidence level is low, then the line can be shutdown or projected differently in the next frame, e.g., at a differentfrequency that can be detected. This technique may be used for darkobjects or when there is a lot of noise, to validate the determineddepth and achieve a desired level of accuracy.

Each projected line may project a unique pattern, in a specificsequence, that can be used to detect the line over time. Thus, if (1)each line has a unique pattern, e.g., a pattern of intensity, thatchanges over time, (2) a projector iterates through the pattern fastenough, (3) the camera's frame rate is high enough to match theprojetor's iteration rate, and (4) objects in the scene are stationaryor moving slowly enough, then the line can be uniquely identified basedon the unique pattern. Because of the unique pattern, and the slow ornonexistent movement, the depth of the line can be resolved based onlocal information (that is, the detected pattern of the line). The framerate needed to identify the unique pattern may be based on the speed ofmovement in the scene, so there is a trade-off between movement andtime. If the scene is stationary or has only slow movement, then arelatively low frame rate, e.g., 50 FPS, may be sufficient. For scenesthat can have faster movement, higher frame rates are needed, e.g., 500to 1000 FPS, since there is not ordinarily movement in nature during a 1or 2 millisecond interval. The number of periods of the pattern thatneed to be detected may correspond to the density of the pattern. Thedepth of the line can be resolved based on the detected pattern of theline when the pattern changes at sufficiently high rate and slowing downthe rate at which the pattern changes depending on the camera's framerate.

FIG. 12 illustrates an example method 1200 for determining depth usingtemporal patterns. The method may begin at step 1210, where the method1200 may project, using at least one projector, a plurality of projectedpatterns, wherein a projected lighting characteristic of each of theprojected patterns varies over a time period in accordance with apredetermined temporal lighting-characteristic pattern associated withthat projected pattern. At step 1220, the method 1200 may capture, usinga camera, a plurality of images at different times during the timeperiod, the images including detected patterns corresponding toreflections of at least a portion of the plurality of projected patternsthat are projected during the time period. At step 1230, the method 1200may determine, for each of the detected patterns, a detected temporallighting-characteristic pattern based on variations in a detectedlighting characteristic of the detected pattern during the time period.At step 1240, the method 1200 may identify one or more of the detectedpatterns that correspond to one or more of the projected patterns bycomparing at least one of the detected temporal lighting-characteristicpatterns to at least one of the predetermined temporallighting-characteristic patterns associated with the time period. Atstep 1250, the method 1200 may Compute one or more depths associatedwith the identified detected pattern(s) based on the correspondingprojected pattern(s), the detected pattern(s), and a relative positionbetween the camera and the projector.

Particular embodiments may repeat one or more steps of the method ofFIG. 12, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 12 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 12 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates an example method fordetermining depth using temporal patterns including the particular stepsof the method of FIG. 12, this disclosure contemplates any suitablemethod for determining depth using temporal patterns including anysuitable steps, which may include all, some, or none of the steps of themethod of FIG. 12, where appropriate. Furthermore, although thisdisclosure describes and illustrates particular components, devices, orsystems carrying out particular steps of the method of FIG. 12, thisdisclosure contemplates any suitable combination of any suitablecomponents, devices, or systems carrying out any suitable steps of themethod of FIG. 12.

In particular embodiments, a light emitting device, such as a projector,may have multiple individually-addressable emitters. Multiple emittersmay be activated to produce a lighting pattern, which may appear as aset of individual light sources that can be detected by a camera andused to determine locations of objects, e.g., by matching reflectedpatterns to particular projected patterns and performing triangulations.The density of the arrangement of emitters on a light emitting devicesuch as a projector may affect the accuracy with which locations aredetermined. For example, emitters that closer to each other may providemore detectable points in a unit of area. However, if the emitters aretoo close to each other, then because of the Gaussian distribution oflight intensity in the beam projected by each emitter, in which lightnear the center of the beam is very bright, the light from adjacentemitters may merge (e.g., overlap), and the light beams from theindividual emitters may become unresolvable when viewed by a camera thatis closer than a threshold distance. Thus, when a camera is relativelyclose to a projector, adjacent emitters should be separated from eachother by a separation distance sufficiently large to prevent merging oftheir light beams. However, when viewed from farther distances, theemitters that are separated by that separation distance appear fartherapart, and depth resolution accuracy may therefore be reduced.

In particular embodiments, to address this problem, as a camera movescloser to a projector, when the Gaussian light beams from multipleemitters merge together, one or more of the active emitters may bedeactivated to provide additional space between active emitters. Toavoid decreased accuracy when the camera is farther from the emitter, asa camera moves farther away from a projector, and the distance betweendetected light sources increases, additional emitters may be activated.The range of distances at which a camera can identify particular pointsof light from an emitter may thus be extended by modifying the emittedlight pattern so the distance between each adjacent pair of illuminatedemitters is greater when the camera is closer to the emitters than whenthe camera is farther away. Increasing the distance between emitters inthis way prevents the light produced by different emitters from mergingtogether when the camera is closer. The emitted light pattern may bemodified so that the distance between adjacent pairs of emitters issmaller when the camera is farther from the emitter, since the distancebetween emitters would otherwise be greater than necessary, which couldresult in less accurate identification of point locations.

In particular embodiments, the density of a lighting pattern projectedby a projection device that includes addressable emitters may be variedby activating or deactivating individual emitters. Higher-densitypatterns may be projected by activating emitters that are spaced moreclosely together, and lower-density patterns may be projected byactivating emitters that are spaced farther apart. Higher-densitypatterns may use more emitters and may thus use more power thanlower-density patterns. Further, higher-density patterns may beunresolvable from close distances. Lower-density patterns may beresolvable from close distances but may provide less accurate positiondetermination than higher-density patterns. For applications thatinvolve determining depth to objects at relatively close distances, suchas hand movement, lower-density patterns may be used. For applicationsthat involve determining depth at farther distances, such asconstructing a depth map of a room or larger space, higher-densitypatterns may be used. An addressable emitter may be used for both typesof applications by activating relatively sparse patterns of emitters forcloser distances (e.g., by activating half of the emitters on aprojector) and activating relatively dense patterns of emitters forfarther distances (e.g., by activating all of the emitters on aprojector).

In particular embodiments, the appropriate density of emitters toactivate may be determined by projecting a pattern, using a camera tocapture an image of the pattern, and determining whether to increase ordecrease the density of the pattern based on the image. For example, ifa dense pattern is projected using 9 emitters of a device, and the lightfrom the individual emitters cannot be resolved (e.g., the light ismerged together and does not appear as 9 separate light sources), thenthe camera may be too close to the emitters to resolve the densepattern, and the density of the pattern may be decreased. The densitymay be decreased by, e.g., deactivating half of the active emitters,e.g., every second active emitter, and capturing an image of theremaining the active emitters. If the individual emitters still cannotbe resolved, then the process may be repeated, e.g., by deactivatinghalf of the active emitters again and determining whether the remainingemitters can be resolved, and so on, until the active emitters can beresolved (e.g., the number of distinct light sources detected in thecamera image matches the number of active emitters). Light sources neednot be completely separate to be individually-resolvable; an overlapthreshold may be used to resolve light sources that are partiallyoverlapping, for example. As another example, if individual lightsources can be resolved, then additional emitters may be activated,e.g., by doubling the number of active emitters. A camera may thencapture an image of the increased number of emitters. If the activeemitters can be resolved, then they may be used for subsequent frames,or, alternatively, the number of active emitters may be increased again,until the active emitters cannot be resolved, at which point theprevious (resolvable) pattern of active emitters may be used forsubsequent frames.

In particular embodiments, dense and sparse patterns may be projected inalternating frames by activating emitters that are closer together forthe dense pattern and activating emitters that are farther apart for thesparse patterns. A camera may detect the alternating sparse and densepatterns and determine whether the emitters can be resolved in eachpattern. If emitters can be resolved in the dense pattern, then thedense pattern may be used subsequently (e.g., for projection to bedetected in subsequent frames captured by a camera), unless the patternis more dense than necessary, in which case a more sparse pattern may beused. A pattern may be more dense than necessary if, for example, thedensity of the pattern provides more accuracy than needed or than can beused because of other limitations on accuracy, e.g., limitations fromother devices such as camera frame rate.

If the individual emitters of the dense pattern cannot be resolved, thenthe Gaussian light from the emitters may be overlapping, and a moresparse pattern may be projected subsequently (e.g., for use in framescaptured subsequently by a camera). For example, if the individualemitters of the sparse pattern can be resolved, then the sparse patternmay be used subsequently, or new sparse pattern having a density betweenthe sparse pattern and the non-resolvable dense pattern may be generatedand projected. The new sparse pattern may be analyzed as described aboveto determine if it is resolvable and should be projected for use insubsequent frames. For example, the width of a line or intensity oflight may be used to determine that Gaussian beams have merged together.

FIG. 13A illustrates example illumination patterns of an illuminator1302 for determining depth from different distances. The illuminator1302 may be, e.g., an addressable illuminator and may be included in aprojector. The illuminator in this example has 9 emitters 1311-1319. All9 emitters are active, e.g., emitting light, in a first pattern 1304.The emitters may emit patterns for use in depth sensing, for example.However, as a camera moves closer to the projector 1302, the Gaussianlight distributions from the active emitters may appear to mergetogether because of the intensity properties of the Gaussian light.Thus, at sufficiently close distances, the light from multiple emittersmay merge together, and the individual features of the light pattern,e.g., the dots or lines produced by the emitters 1310-1318, may nolonger be resolvable. The accuracy of structured depth-sensingtechniques may be reduced at short distances because of this merging ofthe Gaussian light patterns. In particular embodiments, one or more ofthe active emitters may be deactivated, thereby increasing the distancebetween active emitters, so that the light from active emitters does notmerge when a camera is closer than a certain distance. It may bedesirable for emitters to remain active if possible, since a largernumber of active emitters may provide more accurate depth sensing. Thus,the particular emitters to deactivate may be identified using aniterative process.

As shown in FIG. 13A, when the light from the emitters begins to mergetogether, e.g., because the camera is less than a threshold distancefrom the emitters, every second active emitter may be deactivated. Inthe initial pattern 1304, all 9 emitters are active, so deactivatingevery other active emitter results in the second, fourth, sixth, andeighth emitters being deactivated, as shown in the second pattern 1310.Emitters 1312, 1314, 1316, and 1318 have been deactivated, and emitters1311, 1313, 1315, 1317, and 1319 remain active in the pattern 1310. Thelight from the emitters may still appear to merge of the camera issufficiently close to the projector 1302, or may begin to merge as thecamera moves closer to the projector 1302. If light is still merged orbecomes merged again, e.g., individual emitters are not resolvable, thenadditional emitters may be deactivated by again deactivating everysecond active emitter. The third and seventh emitters are thusdeactivated, producing the pattern 1320, in which emitters 1311, 1315,and 1319 remain active.

If light is still merged or becomes merged after a period of time,additional emitters may be deactivated by again deactivating everysecond active emitter. The fifth emitter is thus deactivated, producingthe pattern 1330, in which emitters 1311 and 1319 are active. Then iflight is still merged or becomes merged after a period of time,additional emitters may be deactivated by again deactivating everysecond active emitter. The ninth emitter is thus deactivated, producingthe pattern 1340, in which only emitter 1311 is active. Since only oneemitter is active in this example, merging of light from two emittersdoes not occur. It may be desirable to re-activate emitters if thedistance between the camera and the projector 1302 increases.

As an example, the emitters may be re-activated in the reverse of theorder in which they were de-activated, e.g., by activating pattern 1330,and if there is no merging of light, activating pattern 1320, and ifthere is still no merging of light, activating pattern 1310, andfinally, if there is still no merging of light, activating all emittersof the projector 1302. Although the emitters are described as beingdeactivated or activated according to patterns 1310-1340, these patternsare merely examples, and the lights may be deactivated or activatedaccording to other patterns, e.g., by deactivating odd-numbered emittersor even numbered emitters instead of every second emitter, or bydeactivating more emitters at each step, e.g., by starting thedeactivations with pattern 1320 instead of pattern 1310, and continuingdirectly to pattern 1340 after pattern 1320.

FIG. 13B illustrates example light patterns viewed from differentdistances. As introduced above, since the intensity of light increasesas a viewer (e.g., a camera) moves closer to a light source, theGaussian light beams from adjacent emitters 1312-1316 of an addressableilluminator 1302 appear to merge together as shown by a light pattern1342, and light beams from the individual emitters 1312-1316 becomeindistinguishable in a camera image of the merged light pattern 1342.This merging of light may occur when the distance D1 between theilluminator 1302 and a camera is less than a threshold distance D. Inthe merged light pattern 1342, the light beams from adjacent emitters1312, 1313 are separated by a distance d1. A width of a resolvablefeature, which is the merged light pattern, is labeled w1.

As the distance between the illuminator 1302 and the camera increases,the light beams become larger and individually-resolvable, as shown in alight pattern 1344. In the light pattern 1344, which illustrates theappearance of the light from the illuminator 1302 from a distance D2>D,the light beams from adjacent emitters 1312, 1313 are separated by adistance d2. A width of a resolvable feature, which is a light beam, islabeled w2. As the distance between the illuminator 1302 and the cameraincreases further, the light beams become larger, as shown in a lightpattern 1346. In the light pattern 1346, which illustrates theappearance of the light from the illuminator 1302 from a distance D3>D2,the light beams from adjacent emitters 1312, 1313 are separated by adistance d3. A width of a resolvable feature, which is a light beam, islabeled w3.

FIG. 13C illustrates example projected patterns viewed from differentdistances. In this figure, the emitters of the illuminator 1302 projectlines of light. When viewed from a short distance, the Gaussian lightbeams from adjacent emitters 1312-1316 of the emitters may appear tomerge together as shown by a merged light pattern 1347, and light beamsfrom the individual emitters 1312-1316 become indistinguishable in acamera image of the merged light pattern 1347. The distance D1 betweenthe illuminator 1302 and a camera is less than a threshold distance D. Awidth of a resolvable feature, which is the merged light pattern, islabeled w4.

As the distance between the illuminator 1302 and the camera increases,the light beams become larger and individually-resolvable, as shown in alight pattern 1348. In the light pattern 1348, which illustrates theappearance of the light from the illuminator 1302 from a distance D2>D,the light beams from adjacent emitters 1312, 1313 are separated by adistance d4. A width of a resolvable feature, which is a line producedby an emitter (and may include one or more light beams), is labeled w5.As the distance between the illuminator 1302 and the camera increasesfurther, the light beams become larger, as shown in a light pattern1349. In the light pattern 1349, which illustrates the appearance of thelight from the illuminator 1302 from a distance D3>D2, the light beamsfrom adjacent emitters 1312, 1313 are separated by a distance d5. Awidth of a resolvable feature, which is the line produced by an emitter,is labeled w6.

FIGS. 13D and 13E illustrate example illumination patterns of atwo-dimensional illuminator for determining depth from differentdistances. In particular embodiments, when the light from the emittersbegins to merge together, e.g., because the camera is less than athreshold distance from the emitters, a set of the emitters may bedeactivated. The emitters to deactivate may be selected to that thereare no horizontally or vertically adjacent pairs of active emitters.That is, so there are no active emitters separated by a horizontal orvertical distance of 1. Alternatively, half of the active emitters maybe deactivated by selecting every second active emitter may bedeactivated. As shown in FIG. 13D, in an initial pattern 1350, 25emitters are active. Every second active emitter may be identified bystarting at the top left of the emitter pattern 1350 and selecting everysecond emitter. When the end of a row is reached, the selection maycontinue on to the next row. Deactivating every second active emitter ofthe pattern 1350 results in the even-numbered emitters beingdeactivated, as shown in the second pattern 1352. In the second pattern1352, emitters 1354, 1356, 1358, 1360, 1362, 1364, 1366, 1368, 1370,1372, 1374, and 1376 have been deactivated. The light from the emittersmay still appear to merge of the camera is sufficiently close to theprojector, or may begin to merge as the camera moves closer to theprojector. If light is still merged or becomes merged again, e.g.,individual emitters are not resolvable, then additional emitters may bedeactivated. The emitters to deactivate may be selected to that thereare no active emitters separated by a horizontal or vertical distance of2. The result of deactivating these emitters is shown in FIG. 13E aspattern 1380, in which emitters 1381, 1382, 1383, 1384, 1385, 1386,1387, and 1388 have been deactivated. Subsequently, if light is stillmerged or becomes merged after a period of time, additional emitters maybe deactivated. Emitters 1391, 1392, 1393, and 1394 may thus bedeactivated, producing the pattern 1390, in which only the centeremitter is active. Since only one emitter is active in this example,merging of light from two emitters does not occur. It may be desirableto re-activate activate emitters if the distance between the camera andthe projector 1302 subsequently increases.

In particular embodiments, the distance between the emitter and thecamera may be determined and used to control the distance betweenemitters. Alternatively, the camera image may be analyzed to determinethat adjacent lights have merged (e.g., to form a line) based on thewidth of the detected light, and the distance between each pair ofemitters may be increased when the lights appear to merge. As anotherexample, a bright light detected by a camera may or may not be from astructured light pattern. The emitter density, e.g., the number ofactive emitters in a particular area, may be changed in the next frameand the image in the frame evaluated to determine if the light is from apattern by, e.g., activating or deactivating certain emitters, thendetermining whether the camera detects that those emitters have beenactivated or deactivated. This process may be repeated by activating ordeactivating different emitters in each iteration of a loop anddetermining that the emitted patterns have been detected or not detectedafter a threshold number of iterations.

FIG. 14 illustrates an example method 1400 for activating ordeactivating one or more light emitters of an illuminator fordetermining depth from different distances. The method may begin at step1410, where the method 1400 may project, using at least one projector, aprojected pattern comprising a plurality of projected features havingdifferent locations. At step 1420, the method 1400 may capture, using acamera, an image comprising a detected pattern corresponding to areflection of the projected pattern. At step 1430, the method 1400 mayIdentify at least one detected feature of the detected pattern, whereinthe detected feature corresponds to at least one reflection of theprojected features. At step 1440, the method 1400 may activate ordeactivate one or more of the light emitters based on the detectedfeature.

Particular embodiments may repeat one or more steps of the method ofFIG. 14, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 14 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 14 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates an example method foractivating or deactivating one or more light emitters of an illuminatorfor determining depth from different distances including the particularsteps of the method of FIG. 14, this disclosure contemplates anysuitable method for activating or deactivating one or more lightemitters of an illuminator for determining depth from differentdistances including any suitable steps, which may include all, some, ornone of the steps of the method of FIG. 14, where appropriate.Furthermore, although this disclosure describes and illustratesparticular components, devices, or systems carrying out particular stepsof the method of FIG. 14, this disclosure contemplates any suitablecombination of any suitable components, devices, or systems carrying outany suitable steps of the method of FIG. 14.

In a system that performs depth sensing using structured light, powerconsumption may be reduced by deactivating emitters of an illuminatorthat are not needed or not used, such as by scanning for movement in ascene by projecting a sparse pattern in a low-power mode and, uponidentifying movement, projecting a denser pattern to update a depth mapbased on the motion. The disclosed techniques may use addressableilluminators, which may have individually-controllable emitters. Theintensity of the structured light projected by the addressable emitterscan vary based on input current. The structured light may be projectedin a pattern such as a set of points, lines, or grid of lines.

In particular embodiments, a technique for saving power involvesprojecting a dense pattern to create a dense model of a scene, thensubsequently operating in a low-power scanning mode by projecting asparse pattern to sample portions of the scene for changes. If anychanges are detected, such as motion that intersects one or more linesof the sparse pattern, then the dense pattern may again be projected tocreate or update the dense model of the scene. Further, portions of thescene may be sampled for changes by projecting a sparse pattern, such asa line, onto the portions and using a camera to detect reflections ofthe sparse pattern that indicate movement. Periodically, e.g., everysecond, a single-frame burst of a dense pattern may be projected tocreate or update the dense model of a scene.

FIG. 15 illustrates an example of reducing grid light pattern density toreduce power consumption. A dense pattern 1502 is projected on a sceneat time T1. At time T2, a sparser pattern is projected onto the scenebecause, for example, motion has not been detected in the scene betweentimes T1 and T2. Since there is no motion, the existing depth map may beused at least through time T2. Since the depth map need not be updatedbetween times T1 and at least T2, a sparser pattern 1504 may beprojected at time T2 to detect motion. The use of the sparser pattern1504 at time T2 may reduce power consumption, since fewer lines areprojected in sparse patterns than in dense patterns. At time T3, whilethe sparse pattern 1504 is still being projected, motion is detected inthe scene, e.g., by detecting distortion of one or more of the gridlines of the pattern 1504 or by using a motion detection algorithm on animage of the scene. Since motion is detected, the scene has likelychanged, and a new depth map should be generated using the dense pattern1502. The dense pattern 1502 is thus again projected at time T4. At timeT5, no further motion has been detected, so a sparse pattern 1506, whichis sparser than the initial sparse pattern 1504, may be projected ontothe scene. The density of the sparse pattern 1506, e.g., the distancebetween its lines, may be determined based on the size of a smallestdetected object in the scene. For example, the smallest detected objectin the scene at T5 is the Mad Hatter, so the distance between lines ofthe sparse pattern 1506 is selected so that motion of the Mad Hatterwill be detected by the sparse pattern. The size of the object may bedetermined by generating a bounding box of the object. The distancebetween horizontal grid lines may then be set based on the height of thebounding box, and the distance between vertical grid lines may be setbased on the width of the bounding box. At time T5, motion is detectedwhen another person appears in the scene. A denser pattern 1504, whichis denser than the previous pattern 1506, but not as dense as the densepattern 1502, may then be projected onto the scene to detect furthermotion or to generate or update a depth map of the scene.

In particular embodiments, portions of the scene may be sampled forchanges by projecting a sparse pattern, such as a line, onto theportions and using a camera to detect reflections of the sparse patternthat indicate movement. The portions of the scene to be sampled may beselected so that the entire scene is covered after a number of frames,or so that objects of at least a threshold minimum size are detectedafter a number of frames. The sizes of the scanned portions maycorrespond to distances between projected lines of the sparse pattern,and may be based on the expected size of an object. If a relativelylarge object is expected to move, then a relatively small number oflines spaced relatively far apart may be projected. For example, if theminimum size is one quarter of the scene area, and the sizes of thescanned portions correspond to the minimum size, then movement of anobject of the minimum size may be detected within four consecutiveframes.

In particular embodiments, the low-power scanning mode may project thepattern onto a different portion (e.g., region) of the scene in eachsubsequent frame until the entire scene (or an area of a particularsize) has been scanned, at which point the process may repeat. In otherexamples, the sampled portions of the scene may be selected at random,or according to a specific application, such as searching for hands,which are known to be connected to arms. The sampling process may modifythe search based on feedback generated during the search, e.g., thelocations of reflected lines. In particular embodiments, an area of theportion of the scene may be smaller than an area of the scene. Theportions may be identified by identifying a rectangle that encloses thefirst projected pattern and dividing the rectangle that encloses thefirst projected pattern into equal-sized rectangles, wherein each of thedifferent portions corresponds to one of the rectangles. In particularembodiments, when the sampling process detects a change, the densepattern may again be projected, e.g., in the next frame. In particularembodiments, movement of an object may be detected based on one or moreof the second images, and the projector is configured to project thefirst projected pattern in response to detecting the movement of theobject. In particular embodiments, one or more of the emitters mayproject each of the portions of the first projected pattern, and toproject each portion, the projector is configured to activate theemitters that project the portion.

FIG. 16 illustrates an example method 1600 for reducing grid lightpattern density. The method may begin at step 1610, where the method1600 may project, using at least one projector, a plurality of projectedpatterns including a first projected pattern comprising a plurality offirst projected features, onto a scene. At step 1620, the method 1600may capture, using a camera, a plurality of images including a firstdetected pattern corresponding to a reflection of the first projectedpattern. At step 1630, the method 1600 may compute a depth map of thescene based on the first projected pattern, the first detected pattern,and a relative position between the camera and the projector(s). At step1640, the method 1600 may Project, using the projector(s), a secondprojected pattern including a plurality of second projected featuresonto a portion of the scene, wherein the second projected pattern ismore sparse than the first projected pattern. At step 1650, the method1600 may capture, using the camera, a second detected patterncorresponding to a reflection of the second projected pattern. At step1660, the method 1600 may compute a depth map of the portion of thescene based on the second projected pattern, the second detectedpattern, and the relative positions of the camera and the projector(s).At step 1670, the method 1600 may update the depth map of the scenebased on the depth map of the portion of the scene.

Particular embodiments may repeat one or more steps of the method ofFIG. 16, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 16 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 16 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates an example method for reducinggrid light pattern density including the particular steps of the methodof FIG. 16, this disclosure contemplates any suitable method forreducing grid light pattern density including any suitable steps, whichmay include all, some, or none of the steps of the method of FIG. 16,where appropriate. Furthermore, although this disclosure describes andillustrates particular components, devices, or systems carrying outparticular steps of the method of FIG. 16, this disclosure contemplatesany suitable combination of any suitable components, devices, or systemscarrying out any suitable steps of the method of FIG. 16.

In particular embodiments, to reduce power consumption, a pattern ofpoints or lines projected in a frame at a particular time may be dividedinto two or more partial patterns, and the partial patterns may beprojected in consecutive time intervals. A camera may capture thepartial pattern at the time intervals in “partial” frames. Projecting apartial pattern in each frame in place of the entire pattern may reducepower consumption. For example, projecting half the lines of a patternin one frame and the other half in the next frame may reduce powerconsumption by 50%. The camera may receive the consecutive partialframes and combine them to re-construct the complete pattern.

In particular embodiments, as a result of dividing a projected patterninto N partial patterns, each of frame may be divided into N “partial”frames, and each partial frame may have 1/N of the complete pattern. Thevalue N may be understood as an “interlacing factor” and may be selectedfor a particular application according to a tradeoff between how fastthe patterns are to be received and the desired amount of battery powersavings. The interlacing factor may be changed between frames to adaptto the scene. For example, fast detection may be used for a scene of aperson playing a piano, in which case all the lines of the pattern maybe used in each frame, without dividing the pattern (N=1). When theperson stops playing the piano, the interlacing factor may be increasedto N=5. For a camera capturing images at 60 FPS and constructing a depthmap as it moves around a room, each frame may be divided into fiveframes while maintaining the 60 FPS frame rate. In another example, one“line” (unit of pattern) may be projected in each frame. The cameraframe rate may be changed to correspond to the projector frame rate.

FIG. 17 illustrates an example of partitioning a grid light pattern intoportions to reduce power consumption. A pattern 1700 may be divided intofour partial patterns as shown by dotted lines 1702, which divide thepattern 1700 into four quarters. Each quarter of the pattern 1700corresponds to a partial pattern. Each partial pattern may be projectedonto a corresponding portion of the scene for a duration of time, duringwhich a camera may capture reflections of the partial pattern from thescene and generate a depth map of the area of the scene 1704 covered bythe projected partial pattern 1706. The partial patterns may beprojected at different times. At time T1, a first partial pattern 1706is projected onto the upper-left corner of the scene 1704. At time T2, asecond partial pattern 1710 is projected onto the upper-right quarter ofthe scene 1704. The camera may capture reflections of the second partialpattern 1710 from the scene 1704 during the time that the second partialpattern 1710 is projected. The depth sensing system may identifydetected patterns of the quarter of the screen based on reflections ofthe partial pattern. At time T3, the third partial pattern 1714 isprojected onto the lower-left quarter of the scene 1704. The camera maycapture reflections of the third partial pattern 1714 from the scene1704 during the time that the third partial pattern 1714 is projected.At time T4, the fourth partial pattern 1718 is projected onto thelower-left quarter of the scene 1704. The camera may capture reflectionsof the third partial pattern 1718 from the scene 1704 during the timethat the third partial pattern 1718 is projected.

In particular embodiments, the depth sensing system may identify partialdetected patterns based the reflections of the four partial patternswhile the partial patterns are being projected. Alternatively oradditionally, the depth sensing system may identify detected patternsbased on a combination of the reflections of the four partial patternsafter the four partial patterns have been projected.

FIG. 18 illustrates an example method 1800 for partitioning a grid lightpattern into portions to be projected at different times. The method maybegin at step 1810, where the method 1800 may determine a specifiednumber of different portions of a first projected pattern. At step 1820,the method 1800 may project, using at least one projector, differentdetermined portions of the first projected pattern at different timesduring a time interval. At step 1830, the method 1800 may capture, usinga camera, a plurality of images comprising a first detected patterncorresponding to a reflection of the first projected pattern, whereinthe first detected pattern is based on a set of images captured by thecamera at times that are based on the different times during the timeinterval. At step 1840, the method 1800 may generate an image of thefirst detected pattern based on the plurality of images, each of theimages (a) comprising a detected portion of the first detected patternand (b) corresponding to reflections of a corresponding determinedportion of the first projected pattern. At step 1840, the method 1800may Compute a depth map based on the first projected pattern, the imageof the first detected pattern, and a relative position between thecamera and the at least one projector.

Particular embodiments may repeat one or more steps of the method ofFIG. 18, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 18 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 18 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates an example method forpartitioning a grid light pattern into portions to be projected atdifferent times including the particular steps of the method of FIG. 18,this disclosure contemplates any suitable method for partitioning a gridlight pattern into portions to be projected at different times includingany suitable steps, which may include all, some, or none of the steps ofthe method of FIG. 18, where appropriate. Furthermore, although thisdisclosure describes and illustrates particular components, devices, orsystems carrying out particular steps of the method of FIG. 18, thisdisclosure contemplates any suitable combination of any suitablecomponents, devices, or systems carrying out any suitable steps of themethod of FIG. 18.

FIG. 19 illustrates an example computer system 1900. In particularembodiments, one or more computer systems 1900 perform one or more stepsof one or more methods described or illustrated herein. In particularembodiments, one or more computer systems 1900 provide functionalitydescribed or illustrated herein. In particular embodiments, softwarerunning on one or more computer systems 1900 performs one or more stepsof one or more methods described or illustrated herein or providesfunctionality described or illustrated herein. Particular embodimentsinclude one or more portions of one or more computer systems 1900.Herein, reference to a computer system may encompass a computing device,and vice versa, where appropriate. Moreover, reference to a computersystem may encompass one or more computer systems, where appropriate.

This disclosure contemplates any suitable number of computer systems1900. This disclosure contemplates computer system 1900 taking anysuitable physical form. As example and not by way of limitation,computer system 1900 may be an embedded computer system, asystem-on-chip (SOC), a single-board computer system (SBC) (such as, forexample, a computer-on-module (COM) or system-on-module (SOM)), adesktop computer system, a laptop or notebook computer system, aninteractive kiosk, a mainframe, a mesh of computer systems, a mobiletelephone, a personal digital assistant (PDA), a server, a tabletcomputer system, an augmented/virtual reality device, or a combinationof two or more of these. Where appropriate, computer system 1900 mayinclude one or more computer systems 1900; be unitary or distributed;span multiple locations; span multiple machines; span multiple datacenters; or reside in a cloud, which may include one or more cloudcomponents in one or more networks. Where appropriate, one or morecomputer systems 1900 may perform without substantial spatial ortemporal limitation one or more steps of one or more methods describedor illustrated herein. As an example and not by way of limitation, oneor more computer systems 1900 may perform in real time or in batch modeone or more steps of one or more methods described or illustratedherein. One or more computer systems 1900 may perform at different timesor at different locations one or more steps of one or more methodsdescribed or illustrated herein, where appropriate.

In particular embodiments, computer system 1900 includes a processor1902, memory 1904, storage 1906, an input/output (I/O) interface 1908, acommunication interface 1910, and a bus 1912. Although this disclosuredescribes and illustrates a particular computer system having aparticular number of particular components in a particular arrangement,this disclosure contemplates any suitable computer system having anysuitable number of any suitable components in any suitable arrangement.

In particular embodiments, processor 1902 includes hardware forexecuting instructions, such as those making up a computer program. Asan example and not by way of limitation, to execute instructions,processor 1902 may retrieve (or fetch) the instructions from an internalregister, an internal cache, memory 1904, or storage 1906; decode andexecute them; and then write one or more results to an internalregister, an internal cache, memory 1904, or storage 1906. In particularembodiments, processor 1902 may include one or more internal caches fordata, instructions, or addresses. This disclosure contemplates processor1902 including any suitable number of any suitable internal caches,where appropriate. As an example and not by way of limitation, processor1902 may include one or more instruction caches, one or more datacaches, and one or more translation lookaside buffers (TLBs).Instructions in the instruction caches may be copies of instructions inmemory 1904 or storage 1906, and the instruction caches may speed upretrieval of those instructions by processor 1902. Data in the datacaches may be copies of data in memory 1904 or storage 1906 forinstructions executing at processor 1902 to operate on; the results ofprevious instructions executed at processor 1902 for access bysubsequent instructions executing at processor 1902 or for writing tomemory 1904 or storage 1906; or other suitable data. The data caches mayspeed up read or write operations by processor 1902. The TLBs may speedup virtual-address translation for processor 1902. In particularembodiments, processor 1902 may include one or more internal registersfor data, instructions, or addresses. This disclosure contemplatesprocessor 1902 including any suitable number of any suitable internalregisters, where appropriate. Where appropriate, processor 1902 mayinclude one or more arithmetic logic units (ALUs); be a multi-coreprocessor; or include one or more processors 1902. Although thisdisclosure describes and illustrates a particular processor, thisdisclosure contemplates any suitable processor.

In particular embodiments, memory 1904 includes main memory for storinginstructions for processor 1902 to execute or data for processor 1902 tooperate on. As an example and not by way of limitation, computer system1900 may load instructions from storage 1906 or another source (such as,for example, another computer system 1900) to memory 1904. Processor1902 may then load the instructions from memory 1904 to an internalregister or internal cache. To execute the instructions, processor 1902may retrieve the instructions from the internal register or internalcache and decode them. During or after execution of the instructions,processor 1902 may write one or more results (which may be intermediateor final results) to the internal register or internal cache. Processor1902 may then write one or more of those results to memory 1904. Inparticular embodiments, processor 1902 executes only instructions in oneor more internal registers or internal caches or in memory 1904 (asopposed to storage 1906 or elsewhere) and operates only on data in oneor more internal registers or internal caches or in memory 1904 (asopposed to storage 1906 or elsewhere). One or more memory buses (whichmay each include an address bus and a data bus) may couple processor1902 to memory 1904. Bus 1912 may include one or more memory buses, asdescribed below. In particular embodiments, one or more memorymanagement units (MMUs) reside between processor 1902 and memory 1904and facilitate accesses to memory 1904 requested by processor 1902. Inparticular embodiments, memory 1904 includes random access memory (RAM).This RAM may be volatile memory, where appropriate. Where appropriate,this RAM may be dynamic RAM (DRAM) or static RAM (SRAM). Moreover, whereappropriate, this RAM may be single-ported or multi-ported RAM. Thisdisclosure contemplates any suitable RAM. Memory 1904 may include one ormore memories 1904, where appropriate. Although this disclosuredescribes and illustrates particular memory, this disclosurecontemplates any suitable memory.

In particular embodiments, storage 1906 includes mass storage for dataor instructions. As an example and not by way of limitation, storage1906 may include a hard disk drive (HDD), a floppy disk drive, flashmemory, an optical disc, a magneto-optical disc, magnetic tape, or aUniversal Serial Bus (USB) drive or a combination of two or more ofthese. Storage 1906 may include removable or non-removable (or fixed)media, where appropriate. Storage 1906 may be internal or external tocomputer system 1900, where appropriate. In particular embodiments,storage 1906 is non-volatile, solid-state memory. In particularembodiments, storage 1906 includes read-only memory (ROM). Whereappropriate, this ROM may be mask-programmed ROM, programmable ROM(PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM),electrically alterable ROM (EAROM), or flash memory or a combination oftwo or more of these. This disclosure contemplates mass storage 1906taking any suitable physical form. Storage 1906 may include one or morestorage control units facilitating communication between processor 1902and storage 1906, where appropriate. Where appropriate, storage 1906 mayinclude one or more storages 1906. Although this disclosure describesand illustrates particular storage, this disclosure contemplates anysuitable storage.

In particular embodiments, I/O interface 1908 includes hardware,software, or both, providing one or more interfaces for communicationbetween computer system 1900 and one or more I/O devices. Computersystem 1900 may include one or more of these I/O devices, whereappropriate. One or more of these I/O devices may enable communicationbetween a person and computer system 1900. As an example and not by wayof limitation, an I/O device may include a keyboard, keypad, microphone,monitor, mouse, printer, scanner, speaker, still camera, stylus, tablet,touch screen, trackball, video camera, another suitable I/O device or acombination of two or more of these. An I/O device may include one ormore sensors. This disclosure contemplates any suitable I/O devices andany suitable I/O interfaces 1908 for them. Where appropriate, I/Ointerface 1908 may include one or more device or software driversenabling processor 1902 to drive one or more of these I/O devices. I/Ointerface 1908 may include one or more I/O interfaces 1908, whereappropriate. Although this disclosure describes and illustrates aparticular I/O interface, this disclosure contemplates any suitable I/Ointerface.

In particular embodiments, communication interface 1910 includeshardware, software, or both providing one or more interfaces forcommunication (such as, for example, packet-based communication) betweencomputer system 1900 and one or more other computer systems 1900 or oneor more networks. As an example and not by way of limitation,communication interface 1910 may include a network interface controller(NIC) or network adapter for communicating with an Ethernet or otherwire-based network or a wireless NIC (WNIC) or wireless adapter forcommunicating with a wireless network, such as a WI-FI network. Thisdisclosure contemplates any suitable network and any suitablecommunication interface 1910 for it. As an example and not by way oflimitation, computer system 1900 may communicate with an ad hoc network,a personal area network (PAN), a local area network (LAN), a wide areanetwork (WAN), a metropolitan area network (MAN), or one or moreportions of the Internet or a combination of two or more of these. Oneor more portions of one or more of these networks may be wired orwireless. As an example, computer system 1900 may communicate with awireless PAN (WPAN) (such as, for example, a BLUETOOTH WPAN), a WI-FInetwork, a WI-MAX network, a cellular telephone network (such as, forexample, a Global System for Mobile Communications (GSM) network), orother suitable wireless network or a combination of two or more ofthese. Computer system 1900 may include any suitable communicationinterface 1910 for any of these networks, where appropriate.Communication interface 1910 may include one or more communicationinterfaces 1910, where appropriate. Although this disclosure describesand illustrates a particular communication interface, this disclosurecontemplates any suitable communication interface.

In particular embodiments, bus 1912 includes hardware, software, or bothcoupling components of computer system 1900 to each other. As an exampleand not by way of limitation, bus 1912 may include an AcceleratedGraphics Port (AGP) or other graphics bus, an Enhanced Industry StandardArchitecture (EISA) bus, a front-side bus (FSB), a HYPERTRANSPORT (HT)interconnect, an Industry Standard Architecture (ISA) bus, an INFINIBANDinterconnect, a low-pin-count (LPC) bus, a memory bus, a Micro ChannelArchitecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, aPCI-Express (PCIe) bus, a serial advanced technology attachment (SATA)bus, a Video Electronics Standards Association local (VLB) bus, oranother suitable bus or a combination of two or more of these. Bus 1912may include one or more buses 1912, where appropriate. Although thisdisclosure describes and illustrates a particular bus, this disclosurecontemplates any suitable bus or interconnect.

Herein, a computer-readable non-transitory storage medium or media mayinclude one or more semiconductor-based or other integrated circuits(ICs) (such, as for example, field-programmable gate arrays (FPGAs) orapplication-specific ICs (ASICs)), hard disk drives (HDDs), hybrid harddrives (HHDs), optical discs, optical disc drives (ODDs),magneto-optical discs, magneto-optical drives, floppy diskettes, floppydisk drives (FDDs), magnetic tapes, solid-state drives (SSDs),RAM-drives, SECURE DIGITAL cards or drives, any other suitablecomputer-readable non-transitory storage media, or any suitablecombination of two or more of these, where appropriate. Acomputer-readable non-transitory storage medium may be volatile,non-volatile, or a combination of volatile and non-volatile, whereappropriate.

Herein, “or” is inclusive and not exclusive, unless expressly indicatedotherwise or indicated otherwise by context. Therefore, herein, “A or B”means “A, B, or both,” unless expressly indicated otherwise or indicatedotherwise by context. Moreover, “and” is both joint and several, unlessexpressly indicated otherwise or indicated otherwise by context.Therefore, herein, “A and B” means “A and B, jointly or severally,”unless expressly indicated otherwise or indicated otherwise by context.

The scope of this disclosure encompasses all changes, substitutions,variations, alterations, and modifications to the example embodimentsdescribed or illustrated herein that a person having ordinary skill inthe art would comprehend. The scope of this disclosure is not limited tothe example embodiments described or illustrated herein. Moreover,although this disclosure describes and illustrates respectiveembodiments herein as including particular components, elements,feature, functions, operations, or steps, any of these embodiments mayinclude any combination or permutation of any of the components,elements, features, functions, operations, or steps described orillustrated anywhere herein that a person having ordinary skill in theart would comprehend. Furthermore, reference in the appended claims toan apparatus or system or a component of an apparatus or system beingadapted to, arranged to, capable of, configured to, enabled to, operableto, or operative to perform a particular function encompasses thatapparatus, system, component, whether or not it or that particularfunction is activated, turned on, or unlocked, as long as thatapparatus, system, or component is so adapted, arranged, capable,configured, enabled, operable, or operative. Additionally, although thisdisclosure describes or illustrates particular embodiments as providingparticular advantages, particular embodiments may provide none, some, orall of these advantages.

What is claimed is:
 1. A system comprising: at least one projectorconfigured to project a plurality of projected patterns onto a scene,the projected patterns including a first projected pattern thatcomprises a plurality of first projected features, wherein the firstprojected pattern comprises a dense pattern; a camera configured tocapture a plurality of images comprising a first detected patterncorresponding to a reflection of the first projected pattern; and one ormore processors configured to: compute a first depth map of the scenebased on the first projected pattern, the first detected pattern, andrelative positions of the camera and the at least one projector;project, using the at least one projector, a second projected patterncomprising a plurality of second projected features onto a portion ofthe scene, wherein the second projected pattern comprises a sparsepattern as compared to the dense pattern, and capture, using the camera,a second detected pattern corresponding to a reflection of the secondprojected pattern; compute a second depth map of the portion of thescene based on the second projected pattern, the second detectedpattern, and the relative positions of the camera and the at least oneprojector; and update the first depth map of the scene based on thesecond depth map of the portion of the scene.
 2. The system of claim 1,wherein the second projected pattern is sparse as compared to the firstprojected pattern when a distance between adjacent second projectedfeatures of the second projected pattern is greater than a distancebetween adjacent first projected features of the first projectedpattern.
 3. The system of claim 1, wherein a distance between adjacentsecond projected features of the second projected pattern is based on apredetermined minimum object size, and the predetermined minimum objectsize is proportional to a size of one or more expected objects that areexpected to appear in the portion of the scene.
 4. The system of claim3, wherein the distance between adjacent second projected features isfurther based on a predetermined minimum distance by which the expectedobjects are expected to move in the portion of the scene.
 5. The systemof claim 1, wherein the second projected pattern is smaller than thefirst projected pattern, and the number of second projected features ofthe second projected pattern is less than the number of first projectedfeatures of the first projected pattern.
 6. The system of claim 1,wherein the projector is synchronized with the camera and configured toproject the first and second projected patterns at different times, andthe camera is configured to capture the first and second detectedpatterns at different times corresponding to the different times atwhich the first and second projected patterns are projected.
 7. Thesystem of claim 1, wherein the projector is configured to project thefirst projected pattern onto one or more portions of the scene that aredifferent from the portion onto which the second projected pattern isprojected.
 8. The system of claim 1, wherein the projector is configuredto project the second projected pattern onto different portions of thescene at different times.
 9. The system of claim 1, wherein the portionof the scene is selected so that the portion of the scene includes onlyobjects that (a) have not moved or (b) have moved at less than apredetermined threshold rate of motion for at least a predeterminedperiod of time.
 10. The system of claim 1, wherein the portion of thescene is selected based on: one or more random numbers, a particularapplication, or the detected pattern.
 11. The system of claim 1, whereinthe portion of the scene is adjacent to an identified side of a previousportion in which an object was identified in the detected pattern in aprevious frame, wherein the identified side is closer to the object thanother sides of the previous portion.
 12. The system of claim 11, whereinthe portion of the scene is adjacent to an identified side of a previousportion in which an object was identified in the detected pattern in aprevious frame, wherein the identified side is in a direction of motionof the object.
 13. The system of claim 1, wherein a size and location ofthe portion of the scene are determined so that: the entire scene iscovered by successive portions of the scene after a predetermined numberof frames, or objects of at least a threshold minimum size are detectedafter the predetermined number of frames.
 14. The system of claim 1,wherein to project the first projected pattern, the projector is furtherconfigured to project different determined portions of the firstprojected pattern at different times during a time interval, wherein theplurality of images captured by the camera are captured at differenttimes corresponding to the different times at which the portions of thefirst projected pattern are projected, and the first detected pattern isbased on the plurality of images, each of the images (a) comprising adetected portion of the first detected pattern and (b) corresponding toreflections of a corresponding determined portion of the first projectedpattern.
 15. The system of claim 14, wherein the determined portions ofthe first projected pattern are determined by dividing the firstprojected pattern into a specified number of portions.
 16. The system ofclaim 15, wherein the at least one projector comprises a plurality oflight emitters, and the processors are further configured to: determinea number of emitters per portion by dividing the number of emitters ofthe projector by the specified number of determined portions of thefirst projected pattern, wherein the number of emitters in eachdetermined portion of the first projected pattern is based on thedetermined number of emitters per portion.
 17. The system of claim 14,wherein a set of one or more adjacent emitters is assigned to eachdetermined portion of the first projected pattern, and the adjacentemitters comprise physically-adjacent emitters or emitters that projectadjacent first projected features of the first projected pattern. 18.The system of claim 15, wherein the specified number of portions of thefirst projected pattern is determined based on a rate of motion of oneor more objects detected in the images captured by the camera.
 19. Oneor more computer-readable non-transitory storage media embodyingsoftware that is operable when executed to: compute a first depth map ofa scene based on a first projected pattern, a first detected pattern,and relative positions of a camera and at least one projector, whereinthe at least one projector is configured to project a plurality ofprojected patterns onto the scene, the projected patterns include thefirst projected pattern, and the first projected pattern comprises aplurality of first projected features, wherein the first projectedpattern comprises a dense pattern, and wherein the camera is configuredto capture a plurality of images comprising the first detected pattern,and the first detected pattern corresponds to a reflection of the firstprojected pattern; project, using the at least one projector, a secondprojected pattern comprising a plurality of second projected featuresonto a portion of the scene, wherein the second projected patterncomprises a sparse pattern as compared to the dense pattern; capture,using the camera, a second detected pattern corresponding to areflection of the second projected pattern; compute a second depth mapof the portion of the scene based on the second projected pattern, thesecond detected pattern, and the relative positions of the camera andthe at least one projector; and update the first depth map of the scenebased on the second depth map of the portion of the scene.
 20. A methodcomprising: by a computing device, computing a first depth map of ascene based on a first projected pattern, a first detected pattern, andrelative positions of a camera and at least one projector, wherein theat least one projector is configured to project a plurality of projectedpatterns onto the scene, the projected patterns include the firstprojected pattern, and the first projected pattern comprises a pluralityof first projected features, wherein the first projected patterncomprises a dense pattern, and wherein the camera is configured tocapture a plurality of images comprising the first detected pattern, andthe first detected pattern corresponds to a reflection of the firstprojected pattern; by the computing device, projecting, using the atleast one projector, a second projected pattern comprising a pluralityof second projected features onto a portion of the scene, wherein thesecond projected pattern comprises a sparse pattern as compared to thedense pattern; by the computing device, capturing, using the camera, asecond detected pattern corresponding to a reflection of the secondprojected pattern; by the computing device, computing a second depth mapof the portion of the scene based on the second projected pattern, thesecond detected pattern, and the relative positions of the camera andthe at least one projector; and by the computing device, updating thefirst depth map of the scene based on the second depth map of theportion of the scene.